Forum Discussion
Anonymous
5 years agoNot applicable
Hiding rows with blank or 0 data
Hi all.
I am attempting to hide blanks when there is no data for a table value:
Value YTD hide = CALCULATE('Month_Dataset'[Total MTD Value],CALCULATETABLE(DATESYTD('DIM_Date'[Date],'DIM_Date'[Value YTD hide]=TRUE)))
I created a column in the date table that gives a true/false indicator if the date is greater than today's date:
DatesWithValues = 'DIM_Date'[End of Month]<=MAX(Month_Dataset[Month End Date])
This is working but when I try to hide data that has $0 value, I get the following error:
Only constant date value is allowed as a year end date argument.
Any ideas on fixing this?
Heather
1 Reply
- DataInsights
Super User
Anonymous,
Would you be able to provide example data and the desired result? Blanks returned by a measure are suppressed by default. To suppress zeros, you could convert zero to blank (resulting in zero and blank being suppressed):
Measure = IF ( [Total MTD Value] = 0, BLANK (), [Total MTD Value] )