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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Solved! Go to Solution.
Hi @SushmaReddy ,
You can try this code:
Measure =
VAR _s =
SUMMARIZE (
'Table',
[M1],
"max", MAX ( 'Table'[Date] ),
"status",
CALCULATE (
MAX ( 'Table'[Status] ),
FILTER ( 'Table', 'Table'[M1] = EARLIER ( 'Table'[M1] ) )
)
)
RETURN
COUNTROWS ( FILTER ( _s, [status] = "Failed" ) )
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SushmaReddy ,
You can try this code:
Measure =
VAR _s =
SUMMARIZE (
'Table',
[M1],
"max", MAX ( 'Table'[Date] ),
"status",
CALCULATE (
MAX ( 'Table'[Status] ),
FILTER ( 'Table', 'Table'[M1] = EARLIER ( 'Table'[M1] ) )
)
)
RETURN
COUNTROWS ( FILTER ( _s, [status] = "Failed" ) )
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you and the logic is working
@SushmaReddy , try like
Measure =
VAR __id = MAX ('Table'[M1] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[M1] = __id )
CALCULATE ( Count ('Table'[Status] ), VALUES ('Table'[M1] ),'Table'[M1] = __id,'Table'[Date] = __date, 'Table'[Status] = "Failed" )
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |