Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Heather_W_876
Frequent Visitor

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 1
DataInsights
Super User
Super User

@Heather_W_876,

 

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] )

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors