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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everybody!
I need to calculate the number of rows where the max row of column "State" has the value "Mount" in column "Process".
So, the table has the following structure
Order | Date | State | Process |
100 | 01.01.2019 | 50 | Drilling |
100 | 01.01.2019 | 60 | Mount |
My actual approach is the following:
=CALCULATE(COUNTROWS(table1);FILTER(table1;table1[Process]="Mount");FILTER(table1;table1[State]=....
Hi @joshua1990
try a measure
Measure =
var _maxState = calculate(MAX('Table'[State]);ALL('Table'[State]))
RETURN
CALCULATE(COUNTROWS('Table');ALL('Table');'Table'[State]=_maxState;'Table'[Process]="Mount")
do not hesitate to give a kudo to useful posts and mark solutions as solution