Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have tried to create a new column and using the following DAX code:
Incoming Messages = CALCULATE (
COUNTA(PS_Message[MessageName]),
FILTER (
ALL ( PS_Message[MessageName] ),
'PS_Message'[MessageName] = ("1 - Incoming")
&& 'PS_Message'[MessageName] = ("2 - Received")
&& 'PS_Message'[MessageName] = ("3 - Sent")
)
)
For some reason i don't get any results, however, if i try just one row (lets say the first one "1 - Incoming) it works.. each rows works by itself and i get a count, together it doesn't work.
Thanks in advance!
Solved! Go to Solution.
&& means all conditions are required. That formula will only return rows on which MessageName simultaneously is 1 - Incoming, 2- Received, and 3 - Sent. Which is impossible because one field can only have one value. You should be using || instead of &&.
Proud to be a Super User!
&& means all conditions are required. That formula will only return rows on which MessageName simultaneously is 1 - Incoming, 2- Received, and 3 - Sent. Which is impossible because one field can only have one value. You should be using || instead of &&.
Proud to be a Super User!
Makes total sense! thanks!
@Ronnie7
Hi, dude.
You can do something like this:
MeasureX = CALCULATE( COUNTROWS(Table1); FILTER(Table1;Table1[Column1] = "TEXT1" && Table1[Column1] = "TEXT2" || Table1[Column1] = "TEXT3" || Table1[Column1] = "TEXT4" ))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 33 | |
| 32 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |