Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
joshua1990
Post Prodigy
Post Prodigy

COUNTROWS FILTER MAX AND STRING

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

OrderDateStateProcess
10001.01.201950Drilling
10001.01.201960Mount

 

My actual approach is the following:

=CALCULATE(COUNTROWS(table1);FILTER(table1;table1[Process]="Mount");FILTER(table1;table1[State]=....

1 REPLY 1
az38
Community Champion
Community Champion

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

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.