2. Problem
● If slicing a report using a dimension table, the slicer will
contain all items in the dimension table even though there
may not be any data in the fact table
● This is problematic for the user since they may select
dates for which there is no data, or have trouble finding
the date they want to use as a report filter
2
3. Solution
● This is not a definitive solution, this just works for me as a work
around. I am yet to find a DAX solution that works in all cases
● The example I am using is for a date table as the dimension.
● Overview::
○ A calculated column in the date table that reference the
fact tables date
○ Add the measure as a calculated column to the Page or
Report level filters
○ Remove any blank items from the filter
3
4. 4
Date Table
The date table starts on 1 Jan 2012.
Fact Table
The fact table starts in 2015
5. 5
Slicer not filtered
The slicer (YearNumber) contains all the years in the date table from 2002
– 2019.
For the energy supply (Fact Table) there is only data from 2005 – 2016.
6. User Experience
Although this issue seems small it can impact the
user experience, for example:
● Not all the dates are shown in the drop down list
of the slicer.
● The user can see 2002 as a selection but 2016 is
not on the list.
● 2002 has no data and should be shown for
selection
● 2016 does have data but is not on the list
6
7. 7
Add Calculated Column Date
Table
● Add a calculated column in the date table that refers to the datekey in the fact
table
● In the example above I used MAX() of the dates field in the fact table
● I named the column YearFact
8. 8
Add to Page /
Report Filter
● Add the calculated column (YearFact) to
the Report Level Filters section
● You will notice that there are some field
that are blank, these are dates that
appear in the date table but not in the
fact table
9. 9
Remove (Blank)
● Remove the (blank) fields by
deselecting the field
● This removes all the years in the slicer
for which there is no corresponding
year in the fact table
11. Thanks!
I am Johann Krugell
A practical guide to “Power-Up” your analysis
You can find me at @JohannKrugell@linkedin
11
12. Credits
Special thanks to all the people who made and
released these awesome resources for free:
● Presentation template by SlidesCarnival
● Photographs by Unsplash
12