Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |