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.
Hi Team,
is there anyway to Hiding Blanks in card measure results ?
Regards,
Mohsen
Solved! Go to Solution.
Hi @Mohsen_2020
I agree with CNENFRNL . In addition to CNENFRNL 's reply, CNENFRNL 's measure works well, and I will explain how to do this by a test.
I build a easy table to have a test.
If we build a measure to calculate the Value when Category = B, and show the measure in Card, it will show(Blank) like your screenshot .
So we can use If function to replace (Blank) with others like 0, "" (Strings).
More info about Var and If function : Var, IF
Measure =
Var _B = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Category]="B"))
return
IF(_B = BLANK(),"",_B)
Result:
You can download the pbix file from this link: Hiding Blanks in card measure results
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Mohsen_2020 , consider replacing blank() with ""(zero-length string)?
Coaching Score =
VAR __score = ...
RETURN IF ( ISBLANK ( __score ), "", __score )
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
could you please tell me the how to?
Hi @Mohsen_2020
I agree with CNENFRNL . In addition to CNENFRNL 's reply, CNENFRNL 's measure works well, and I will explain how to do this by a test.
I build a easy table to have a test.
If we build a measure to calculate the Value when Category = B, and show the measure in Card, it will show(Blank) like your screenshot .
So we can use If function to replace (Blank) with others like 0, "" (Strings).
More info about Var and If function : Var, IF
Measure =
Var _B = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Category]="B"))
return
IF(_B = BLANK(),"",_B)
Result:
You can download the pbix file from this link: Hiding Blanks in card measure results
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |