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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

DAX Formula Help

Hi 

I am new to DAX and I would like to know how I can fix this

 

I have the following sample dataset 

ID XYLength 
10.321False 100
10.375False 150
10.425False 200
10.257TRUE275
10.309False 300
10.2948False 125
10.2806TRUE95
20.2664False 225
20.2522False 205
20.238False 210
20.2238False 215
20.2096False 219
20.1954False 224
30.1812TRUE229
30.167False 234
30.1528False 239
30.1386False 243
30.1244False 248
40.1102True 253
40.096True 258
40.0818True 262
40.0676False 267
40.0534False 272
40.0392False 277

 and I would like to know how to create the following grid using DAX

ID XLength 
10.309370
20.2664-
30.1244229
40.0392773

 

Mainly what I would like to do to make a grid that has for each ID, the predominant X (X that has the biggest length) and if there are any "True" values in the Y column report the summation length of those True records otherwise report a blank.

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

You can use these MEASURES

 

Predominant X =
CALCULATE (
    MAX ( Table1[X] ),
    FILTER ( table1, Table1[Length] = MAX ( Table1[Length] ) )
)

 

Length_ = CALCULATE(sum(Table1[Length]),Table1[Y]=true)

 

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

You can use these MEASURES

 

Predominant X =
CALCULATE (
    MAX ( Table1[X] ),
    FILTER ( table1, Table1[Length] = MAX ( Table1[Length] ) )
)

 

Length_ = CALCULATE(sum(Table1[Length]),Table1[Y]=true)

 

Anonymous
Not applicable

Thanks Zubair for your help, it is really appreciated 🙂

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.