The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everybody.
I have to build a matrix which shows count frequencies over 3 variables that form a hierarchy (building-machine-sensor) on a matrix.
We need to show 0 when the combination of the 3 variables has no rows in the table of interest, but we also keep getting an empty row when we use the countrows function.
The matrix is the one on the left (with a card showing "4" on top).
You can see the dax function on the function toolbar on top.
Contatore Anomalie Import = COUNTROWS ( DISTINCT('Fact Anomalies Import'[VarKey]))+0
I added the "+0" at the end to show the combinations with null frequencies, but we're also getting the empty row at the top and we can't seem to get rid of it, I also tried using VALUES function instead of DISTINCT but it was of no use.
How can we get rid of the empty row but keep the null ones?x
Please help us!
Hi @FabioBeka ,
Try
Contatore Anomalie Import =
VAR _a =
COUNTROWS ( DISTINCT ( 'Fact Anomalies Import'[VarKey] ) )
RETURN
IF ( ISBLANK ( _a ), 0, _a )
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
89 | |
75 | |
53 | |
45 |
User | Count |
---|---|
134 | |
120 | |
75 | |
65 | |
64 |