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 have been searching all day for an answer to my dilemma. I wanted to get the count of how many times the value in a column appears in the column. I have found lots of solutions involving COUNTROW(FILTER formula that also involves EARLIER function. I am amazed that it has worked for a lot of the users who needed that solution. But for some reason, it does not work for me. The resulting value squares the correct count.
To illustrate, for example I have below data. Table name is "Data". I want column B to return the count of occurrence of the ID in column A:
So I made this formula in Power BI Desktop via a calculated column. As you can see, the result is squaring the actual count:
I hope someone can help me with this. Any possible reason why this is happening? And any solution for this?
Thanks in advance.
Solved! Go to Solution.
It seems the implicit aggregation for the value was left on Sum.
Here are two approaches to address the issue with a sample file.
Regards
It seems the implicit aggregation for the value was left on Sum.
Here are two approaches to address the issue with a sample file.
Regards
@raellaylo , Create a measure
countrows(filter(allselected(Table), Table[ID] =max(Table[ID]))
I think simple measure
countrows(Table)
should also 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 |
---|---|
105 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |