Forum Discussion
Calendar Slicer - Only Display Selectable Months with Data
- 6 years ago
Anonymous, try this:
Two fact tables:
Sales_US
Sales_Other
Create a calculated table:
SalesDates = VAR DatesUS = SELECTCOLUMNS ( Sales_US, "Date", Sales_US[Date] ) VAR DatesOther = SELECTCOLUMNS ( Sales_Other, "Date", Sales_Other[Date] ) VAR DatesAll = UNION ( DatesUS, DatesOther ) VAR DatesDistinct = DISTINCT ( DatesAll ) RETURN DatesDistinctJoin the calculated table to the date table:
Create matrix. The row field should be Date from the date table (not the calculated table).
Create slicer using the calculated table.
Anonymous, try this:
Two fact tables:
Sales_US
Sales_Other
Create a calculated table:
SalesDates =
VAR DatesUS =
SELECTCOLUMNS ( Sales_US, "Date", Sales_US[Date] )
VAR DatesOther =
SELECTCOLUMNS ( Sales_Other, "Date", Sales_Other[Date] )
VAR DatesAll =
UNION ( DatesUS, DatesOther )
VAR DatesDistinct =
DISTINCT ( DatesAll )
RETURN
DatesDistinct
Join the calculated table to the date table:
Create matrix. The row field should be Date from the date table (not the calculated table).
Create slicer using the calculated table.
Thank you SO MUCH for the help. That is exactly what I needed and would never have been able to figure that out on my own, but it is exactly what I needed. I appreciate the help and time you took with me more than you know.
- DataInsights6 years ago
Super User
Awesome! Best of luck.
--Aaron