Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello everybody.
I have several measures that calculate some total sums for numerous situations.
Some of them are displaying "(Blank)" if there is no value.
How can I replace this with a "0" ?
I mean, of course, I could do a pretty simple IF ...;0; ...
But is there are more efficient and elegant way?
Is there maybe a function for that?
Or from a dax performance point of view, what is the best way?
@joshua1990 If this has solved your question. Please can you accept a solution.
Multiple people have already suggested the "+0" solution to this. Depending on the columns you are using in your visual, you may see many more rows/columns show up. Visuals automatically filter out blanks, so adding 0 will return a result in those situations that would have been filtered out. You may need to add a separate filter to the visual, etc. to keep remove those unneeded ones again.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Yes, I see. Now I see 0 values for the whole year.
I should consider that somehow 😕
Maybe a conditional format if the value is blank would solve that challenge?
If you are seeing more zeros than you wanted, you can use IF logic to get your desired result. For example, a date requirement or if another measure is blank or not, etc.
NewMeasure = IF(some logic, [Measure] + 0, [Measure])
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @joshua1990 ,
Try
Measure = SUM('Table'[Sales]) + 0
or
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
You'll have to write out a measure for your calculation then add +0 to the end for example.
= SUM(Sales[Amt])+0
This essentially says calculate this amount then add 0.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |