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.
Hello, I'm trying to understand how dax ALL function works. I have a toy dataset
, and a matrix visual in Power BI with "projet id" on rows, and "nature" on columns, and measure "Count" on values. The code of the measure is the following:
Count = COUNTROWS(ALL('Table'))
Here's the result that I have:
It's quite unexpected, because I thought that I will get 7's everywhere, because ALL will remove all the filters. But as you can see there are several blank cells.
How do I make all cells equal to 7?
Thank you.
Solved! Go to Solution.
Hi @a_gaisin ,
Not sure what you want to acheive.
Values are blank as there is no entry for IYEJ...... against nature =1 and so on.
Incase you want all 7, you will need to add the entries in the source file.
By the way, wht is the end goal.
Regards,
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@harshnathani @Anonymous the initial example was quite artificial. Let me explain what I'm really trying to do. For each (project,nature) pair I want my measure to output the number of times it presents in the Table. For example, there's only one line corresponding to pair (0GWS..., 1) in the Table, and there's no lines corresponding to (1YEJ...,1). So, in the first case measure should output 1, and in the other - 0. Is there a way to do that? Thank you.
[Row Count] = COUNTROWS( 'Table' ) + 0
Best
D
@Anonymous thank you for response, I tried it already, and it doesn't work.
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |