Forum Discussion
Dax: blank values +0 formula
- 8 years ago
Hi RichardV,
You can use IF condition in your measure like:
Measure = IF(MAX(Table[Date].[MonthNo])<=MONTH(TODAY()),[amount of files]+0,BLANK())
Remember to enable 'Show items with no data' on chart axis.
Best regards,
Yuliana Gu - 8 years ago
Hi RichardV,
So, currently, with this formula Measure= IF(MAX('Table'[Date])>DAY(TODAY()) . [Amount of files]+0, BLANK()), you can always achieve the desired result, right?
Regards,
Yuliana Gu
Hi RichardV,
You can use IF condition in your measure like:
Measure = IF(MAX(Table[Date].[MonthNo])<=MONTH(TODAY()),[amount of files]+0,BLANK())
Remember to enable 'Show items with no data' on chart axis.
Best regards,
Yuliana Gu
Hi v-yulgu-msft,
Thanks a lot for your comment.
However, it deed not seem to work. Perhaps it has to do with the fact that I don't have the function with "show items with no data' because I create a measure on top of a SSAS tabular model.
The strangest thing is, that I tweaked a little with the formula, and I have seem to make it work. Unfortunately, I do not have an idea why this works.
The only thing that I did, is change "<=" into ">". So the formula becomes:
Measure= IF(MAX('Table'[Date])>DAY(TODAY()) . [Amount of files]+0, BLANK())
I don't have an explanation for why this works. Can I use this safely, or is there any error in this?
Best,
Richard
- v-yulgu-msft8 years agoMicrosoft Employee
Hi RichardV,
So, currently, with this formula Measure= IF(MAX('Table'[Date])>DAY(TODAY()) . [Amount of files]+0, BLANK()), you can always achieve the desired result, right?
Regards,
Yuliana Gu- RichardV8 years agoAdvocate IV
Yes, although no idea why it works