Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator II
Creator II

Keeping 0, removing NULL from a measure

I have a measure that does a simple calculation. I need to keep show the number if the number is greater than or equal to 0, and if there is a null result, not show the null.

It seems like Measure treats 0 as NULL and I need to treat them separately. Any ideas?

Labels (3)
1 Solution

Accepted Solutions
Evan0211
Creator II
Creator II
Author

I figured out a work around. Instead of using sum, I used interval, which allowed me to input the measure as a dimension and then I was able to suppress null values. 

View solution in original post

4 Replies
Evan0211
Creator II
Creator II
Author

This is the measure:

if(Not IsNull([Revised Date]),
Sum(Date([Revised Date]) - Today()),
sum(Date([Initial Date]) - Today()))

The result of this CAN be zero, so I need to include zero values. However, if there are no Revised or Initial dates loaded, this will return null. I need to NOT shot the null values, but if the value is zero, I DO need to show the zero value.

BrunPierre
Partner - Master
Partner - Master

Assuming the measure is the sum of sales by customer, then something like this

Sum({< Customer = {"=Sum(Sales) >= 0"} >} Sales)

Evan0211
Creator II
Creator II
Author

I posted the measure above around the same time you posted this. I am dealing with dates, not sales. I am doing a date diff and I need to include if the diff is zero (the date is today) but I don't need to include if the date is a null (hasn't been input by the customer yet)

Evan0211
Creator II
Creator II
Author

I figured out a work around. Instead of using sum, I used interval, which allowed me to input the measure as a dimension and then I was able to suppress null values.