Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a dashboard where I am have 6 pie charts. The first 3 display data, filtered by a date slicer (there is a second slicer, based on another field but this did not come into the scenario I am about to describe).
The first three pie charts, display the correct data.
The 2nd row of pie charts, showed the same data but for one year ago.
I have a date dimension table, with the relationship correctly set up, so the date slicer works.
For the second row, of pie charts, I am using the SAMEPERIODLASTYEAR, such as:-
Solved! Go to Solution.
Yes, a proper data table which you any decent model must have consist of dates covering full years that you encounter in your model. No, you don't have to go as far back as one year before the first date in your model. You just have to cover the years you do have in your fact tables without any gaps in between. How to reduce entries in a slicer? Easy. You create a suitable measure that will filter your slicer entries (think: Filter Pane) accordingly to whatever criteria you want.
A very common issue... Please read this: Hiding future dates for calculations in DAX - SQLBI
Thanks for that. Your solution does fix my issue but I am confused why, since I am already filtering my date dimension to exclude future dates.
Sure enough, if I remove the filter from my date dimension table, the problem relating to same period last year, is resolved. I have even removed the calculated field, which determines whether the date exists in my fact table (and from the measure) and it still works.
However, we also use that date in a dimension table. We were filtering date dimension table, to restrict the dates in the slicer to the dates in the fact table.
In conclusion, it would appear that we require the following:-
Thanks
Yes, a proper data table which you any decent model must have consist of dates covering full years that you encounter in your model. No, you don't have to go as far back as one year before the first date in your model. You just have to cover the years you do have in your fact tables without any gaps in between. How to reduce entries in a slicer? Easy. You create a suitable measure that will filter your slicer entries (think: Filter Pane) accordingly to whatever criteria you want.