Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a set of values from a calculated measure that represents the scores from a test - it counts the number of "Correct" marks. I basically want to count the rows of the values less than the current row value. Note that the scores can appear multiple times.
An example of what I am trying to achieve is below...
Thanks!
Solved! Go to Solution.
Hi,
Thank you for your feedback.
Could you please try the below?
Expected count result measure: =
VAR _a = [PRE_TotalNumeracy measure]
RETURN
CALCULATE (
DISTINCTCOUNT ( 'TableName'[Name] ),
FILTER ( ALL ( 'TableName'[Name] ), [PRE_TotalNumeracy measure] < _a )
)
Hi,
I am not sure how your datamodel looks like, but could you please try something like below wether it suits your requirement?
Expected count result measure: =
VAR _a = [PRE_TotalNumeracy measure]
RETURN
CALCULATE (
DISTINCTCOUNT ( 'TableName'[ColumnName] ),
[PRE_TotalNumeracy measure] < _a
)
I have a "People" table that filters 1..* the "Responses" table. The Responses table looks something like...
Name | Question Number | Mark | Bit |
ABC | Question 1 | Correct | 1 |
ABC | Question 2 | Correct | 1 |
ABC | Question 3 | Incorrect | 0 |
ABC | Question 4 | Correct | 1 |
And the score is an aggregate of the "Bit" column. I feel like your answer is almost there but I am just getting this error: A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Hi,
Thank you for your feedback.
Could you please try the below?
Expected count result measure: =
VAR _a = [PRE_TotalNumeracy measure]
RETURN
CALCULATE (
DISTINCTCOUNT ( 'TableName'[Name] ),
FILTER ( ALL ( 'TableName'[Name] ), [PRE_TotalNumeracy measure] < _a )
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |