- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Slicers: Only show available values
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 08:39 AM - edited 06-12-2018 08:56 AM
Hi all,
What's the Power BI equivalent of Tableau's "show only available values" in a filter?
Main table:
Day | Account | Value |
1 | A | 0.1 |
2 | A | 0.2 |
3 | A | 0.3 |
1 | B | 0.4 |
2 | B | 0.5 |
Dates table:
Day | Alias |
1 | 1 |
2 | 2 |
3 | Latest |
Say I have slicers for Main[Account] and Dates[Alias] - I want the Dates[Alias] slicer to only show "1" and "2" when I set the Main[Account] slicer to "B".
This seems like a very basic feature so I'm sure it must be achievable somehow?
Solved! Go to Solution.
Accepted Solutions
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 09:16 AM
Just change the filtering to 'Both' in the relationship side
RESULT
RELATIONSHIP
All Replies
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 08:47 AM
If your data model is like your example then the slicers will cross filter. However, if you have two slicers each from a different dimension table connected both in a single filter relationship to a fact table they will not crossfilter.
This is because when one filter is applied it goes through the relationship to the fact table however as the other dimension table is on a single direction relationship the filter from the fact table will not propogate back up to the second dimension table.
The solution is either to have two way relationships between your dim and fact tables, this can have strange and unintended consquences so this is not advised.
Or you can try change the model such as merging dim tables or denormalising them into the fact table.
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 08:51 AM
I am not totally sure I understood your problem, but when I add two slicers - One for Account and one for Day I get the expected result (attached in the screenshot)
Or did you mean do you wanted to add a slicer and then upon the slicer limit it to a few defined options?
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 08:51 AM
Hmm, sound accurate - for me I have an extra Dates table that just has the distinct dates (i.e. one-to-many). Filtering for an Account in the main table will not back-propagate to the Dates table.
Does that mean the only solution is the very unclean approach of adding my date aliases ("Most recent" etc.) to my main table (and hence to millions of rows) instead of using a separate Dates table?
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 08:55 AM
@nirvana_moksh: Sorry, turns out my example was too simple - I've updated the original question now!
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 09:16 AM
Just change the filtering to 'Both' in the relationship side
RESULT
RELATIONSHIP
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 09:25 AM
Ah, perfect - that does the trick!
Re: Slicers: Only show available values
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-12-2018 09:26 AM
I have worked with Tableau and I have loved it a lot, but Power BI is pretty awesome and you will surely find all functionality in it