Forum Discussion
rk1904
7 months agoNew Member
Use show items with no data with dynamic x-axis dates
Hello, I have a measure that depending on the date chosen in the slicer, will display the last 6 months up to that selected date. However, if the measure has no value for any of those months, the m...
- 7 months ago
Keep Year-Month from Table Dates Aux on the X-axis
Turn on Show items with no data for that axis field
Add this measure and filter the visual to Flag = 1
Axis - Last 6 Months Flag = VAR AnchorDate = MAX ( 'Table Dates'[Date] ) -- date selected in slicer (Table Dates) VAR EndMonth = EOMONTH ( AnchorDate, 0 ) VAR ThisMonth = EOMONTH ( MAX ( 'Table Dates Aux'[Date] ), 0 ) RETURN IF ( ThisMonth <= EndMonth && ThisMonth > EOMONTH ( EndMonth, -6 ), 1, 0 )Then:
Put Axis - Last 6 Months Flag into the Visual level filters
Set it to is 1
Keep Show items with no data = On
AshokKunwar
7 months agoContinued Contributor
HII rk1904
If this solves your X-axis range issue, please mark this as the "Accepted Solution" to help others!