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 all,
I have a calculated measure that counts the ID for each Category, and when the count=0, I want to show blank, which I have worked out. This is my Dax
Now the problem is when I show it in Table, I have gaps on the rows due to my calculation to show blank.
What I want is to ignore it altogether from the table for the count = 0. Does anyone know how I can achieve this?
This is what I’m hoping to get:
Thanks in advance.
Cheers,
Kev
Solved! Go to Solution.
Hi, @BigKev ;
You could modify it as follows:
Comments2 =
var PUrgent=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="1-Urgent")+0
var PHigh=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="2-High")+0
var PMedium=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="3-Medium")+0
return
IF(PUrgent=0,BLANK(),PUrgent&" "&"Tagged as Urgrent"&UNICHAR(10))&
IF(PHigh=0,BLANK(),PHigh&" "&"Tagged as High"&UNICHAR(10)) &
IF(PMedium=0,BLANK(),PMedium&" "&"Tagged as Medium")&UNICHAR(10)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @BigKev ;
You could modify it as follows:
Comments2 =
var PUrgent=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="1-Urgent")+0
var PHigh=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="2-High")+0
var PMedium=CALCULATE(COUNT('Table'[ID]),'Table'[SEVERITY]="3-Medium")+0
return
IF(PUrgent=0,BLANK(),PUrgent&" "&"Tagged as Urgrent"&UNICHAR(10))&
IF(PHigh=0,BLANK(),PHigh&" "&"Tagged as High"&UNICHAR(10)) &
IF(PMedium=0,BLANK(),PMedium&" "&"Tagged as Medium")&UNICHAR(10)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@BigKev , filter that in return statement or at visual level filter and try
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |