Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I have been researching everywhere but I cannot find the same answer.
Raw data: I have a table where the agent received a score based each Date.
| Date | AgentName | Score |
| 1/05/2022 | Kim | 10 |
| 2/05/2022 | Jane | 50 |
| 3/05/2022 | Kim | 20 |
| 4/05/2022 | Annie | 5 |
| 5/05/2022 | Tom | 6 |
| 6/05/2022 | Joe | 25 |
| 7/05/2022 | Tom | 40 |
Visualisation 1: I sum the total score each agent received. I also add the [Date] as slicer.
PLUS I added a measure - if the score < 25 then 1 else 0
| AgentName | Sum of Score | Pass/Fail |
| Annie | 5 | 1 |
| Jane | 50 | 0 |
| Joe | 25 | 1 |
| Kim | 30 | 0 |
| Tom | 46 | 0 |
Now, what I want is to Distinctcount [AgentName] who received 1, subject to the [Date] filter in slicer.
Eg. without filter , I want to get a value of 2 (Discountcount on AgentName). Or if I want to filter [Date} between 06/05/2022 and 07/05/2022, I should get a value of 1.
Here is the formula I got stuck with :'(
Var StartDate = MIN(Table[Date])
Var EndDate = MAX(Table[Date])
Var RelativeValue = SWITCH(ISFILTERED(Table[Date]),
TRUE, CALCULATE(SUM([Score]), AND(Table[Date] >= StartDate, Table[Date] <= EndDate), FILTER(Table, [Score] <25)),
FALSE, CALCULATE(SUM([Score]), FILTER(Table, [Score] <25)))
RETURN
IF(RelativeValue = BLANK(), 0, RelativeValue)
Solved! Go to Solution.
Hi @Anonymous
You can use
Pass/Fail =
SUMX (
SUMMARIZE ( 'Table', 'Table'[AgentName],'Table'[Date] ),
CALCULATE (
IF ( [Sum of Scores] > 25, 1 )
)
)Hi @Anonymous
You can use
Pass/Fail =
SUMX (
SUMMARIZE ( 'Table', 'Table'[AgentName],'Table'[Date] ),
CALCULATE (
IF ( [Sum of Scores] > 25, 1 )
)
)Hi:
You can try two calculated columns and one measure. Measure at bottom.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 20 | |
| 12 | |
| 10 |