Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
As you can see below, December shows up as a slicer option even though the values do not go beyond November.
This happens with any table I try to visualize and slice, but I thought perhaps dates would be the simplest way to show. In the example, I simply have a Facts table with a Sales amount and a Dates table with various date options. The report is filtered to only show the year 2016.
I have found other topics which suggest to make sure the X axis is set to Categorical, which it is:
Solved! Go to Solution.
"Single" cross filter direction from DimDates to Facts ?
On our date dimension table I have a calculated column to work out if a date is in the future. So I can just use the filter to make sure all dates are zero which excludes any future dates. Column calculation below.
FutureDay = if([Date]>date(year(now()),month(now()),day(now())) ,1,0)
OK, that is a novel idea.
I wonder if I can make a filter similar to this to filter out data from other tables (like Customers or Products) so that it doesn't show options that are filter out for those as well.
I have a very similar report and your approach works just fine for me.
Obvious questions - there's no other data on the report interacting with that slicer which might be forcing it to include December - e.g. Budget data?
Correct, no other data.
"Single" cross filter direction from DimDates to Facts ?
I think that was it! Just set it up and desktop and pushing it to the service to make sure, but it looks like that was exactly what I was looking for.
Thank you so much, I'm relieved that it was a simple, yet elegant solution.
One way to solve this is:
Create a New Table:
Months = SUMMARIZE(FILTER('Calendar',CALCULATE(SUM('Values-2016'[Values])>0)),'Calendar'[Month],'Calendar'[Month-Number])
If December is 0 values in your table: the new table would be from January to November
Made the relationship:
And Use Month from Months in the Slicer.
Thanks for the reply, @Vvelarde
One way to solve this is: Create a New Table
I don't think that is a viable solution because I would then need to create a new table for every slicer that can potentially be used, which are hundreds.
Hi @cricex,
>>The report is filtered to only show the year 2016.
In your slicer, it includes month, how do you show the 2016 year's data?
>>create a new table for every slicer that can potentially be used, which are hundreds.
Could you please describe your requirement clearly for further analysis?
Best Regards,
Angelia
Hello @v-huizhn-msft
In your slicer, it includes month, how do you show the 2016 year's data?
There is a report filter circled in the screenshot showing Year to be explicitly set to 2016.
Could you please describe your requirement clearly for further analysis?
My requirements are to not show options in slicers that do not have data. In the screenshot, you can see in the graph that the data stops in November. Therefore, the slicer should end in November as well.
Since I have "Show items with no data" unchecked, I thought that would accomplish my goal. However, it doesn't seem to work the same way I assumed it would, which is how it works in Excel.
Thank you!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
98 | |
87 | |
35 | |
35 |
User | Count |
---|---|
152 | |
98 | |
81 | |
61 | |
55 |