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.
I have an issue when using COUNTX () with the ALL() function. The value returned is the actual number of rows plus one. I've verified this with a bunch of tables, and I've got a solution, specifically using the ALLNOBLANKROW() function instead of ALL(). What I don't know is why this is necessary or if this is a proper pattern to use for solving counting all the rows that meet a particular condition. Any suggestions would be appreciated.
This DAX returns the correct answer, but I don't know why or if this is a correct pattern to use.
All Requirements without User Stories = VAR counter = COUNTX( ALLNOBLANKROW('Requirement'), IF( [Count of Related User Stories] < 1, 1, BLANK() ) ) RETURN IF ( ISBLANK (counter), 0, counter )
This DAX returns a number that is the correct number plus one. Why?
All Requirements without User Stories = VAR counter = COUNTX( ALL('Requirement'), IF( [Count of Related User Stories] < 1, 1, BLANK() ) ) RETURN IF ( ISBLANK (counter), 0, counter )
Solved! Go to Solution.
Hi @gaccardo
You may refer to ALLNOBLANKROW Function and ALL Function. Here is the article for you. Show a sample as below:
We can get the correct count of rows with ALLNOBLANKROW Function as it returns all rows but the blank row from the parent table of a relationship.
Regards,
Cherie
Hi @gaccardo
You may refer to ALLNOBLANKROW Function and ALL Function. Here is the article for you. Show a sample as below:
We can get the correct count of rows with ALLNOBLANKROW Function as it returns all rows but the blank row from the parent table of a relationship.
Regards,
Cherie
Thank you @v-cherch-msft. That was an excellent explanation and a very informative article.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |