Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
Below screenshot is from a measure table, "TotalScore", "ScoreRange" are measures. I want to count one of the measures based on the measure. For example, if I count totalscore, I want to return ((99.6%, 2), (99.0%,2), (97.9%,1)...) How can I do that?
I
Solved! Go to Solution.
Hi @yishenhui
let's assume that this is a student data (this is irrelevant anyway but only to explain)
first create the following calculated table
Marks =
SELECTCOLUMNS ( GENERATESERIES ( 0.001, 0.001, 1 ), "Mark", [Value] )
then use the following measure
Count =
COUNTROWS (
FILTER (
ADDCOLUMNS (
CROSSJOIN ( VALUES ( 'Table'[Student ID] ), VALUES ( Marks[Mark] ) ),
"@Score", [TotalScore]
),
[Mark] = [@Score]
)
)
Hi @yishenhui
let's assume that this is a student data (this is irrelevant anyway but only to explain)
first create the following calculated table
Marks =
SELECTCOLUMNS ( GENERATESERIES ( 0.001, 0.001, 1 ), "Mark", [Value] )
then use the following measure
Count =
COUNTROWS (
FILTER (
ADDCOLUMNS (
CROSSJOIN ( VALUES ( 'Table'[Student ID] ), VALUES ( Marks[Mark] ) ),
"@Score", [TotalScore]
),
[Mark] = [@Score]
)
)
Hi Tamerj,
I understand your DAX but not sure why it's still not working. (I adjusted the Marks table a little
)
Plaxe the column Mark in a new table visual along with the Count measure
Hi Tamerj,
I got more progress. The totalscore is a calculated value which usually is not exact match the mark.value. I used another column scorerange which is result of floor. I got some count numbers and found they are not match the manual count result. I found I need to add column "year/month" to the table as well. Finally I got the correct numbers. I will mark your answer as solution as the method you provided is the key to reslove it. Thanks!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 22 | |
| 12 | |
| 10 | |
| 10 | |
| 9 |