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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Vaishali04
Helper III
Helper III

Sum of Max data in measure

Hi All,

 

I need help in  building a logic in DAX.

I have below data.

KeyCircuitInOut
AA124
AA274
BB112
BB263
BB336

 

I want to build below  table at UI. I can't create calculated  max_in_out column in backend because I am using what if parameter to modify In and out value on user input.What if parameter value can not be used in calculated column. So need to calculate max_in_out and Sum as measure.

 

KeyCircuitMax_In_OutSum of Max 
AA1411
AA2711
BB1214
BB2614
BB3614

 

Thanks & Regards

Vaishali Rathi

1 ACCEPTED SOLUTION

Hi @Vaishali04 ,

 

Incase you donot want to create a column

 

Create 2 measures

 

MAX_IN_OUT Meausre = IF(MAX('Table'[In]) >= MAX('Table'[Out]) , MAX('Table'[In]) , MAX('Table'[Out]))
 
Sum of Max = SUMX(FILTER(ALL('Table'),'Table'[Key] = MAX('Table'[Key])),[MAX_IN_OUT Meausre])
 
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @Vaishali04 ,

 

1.jpg

 

 

Create a Column

 

MAX_IN_OUT = IF('Table'[In] >='Table'[Out] , 'Table'[In] , 'Table'[Out])

 

Create a measure

Measure = SUMX(FILTER(ALL('Table'),'Table'[Key] = MAX('Table'[Key])),'Table'[MAX_IN_OUT])

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Hi @Vaishali04 ,

 

Incase you donot want to create a column

 

Create 2 measures

 

MAX_IN_OUT Meausre = IF(MAX('Table'[In]) >= MAX('Table'[Out]) , MAX('Table'[In]) , MAX('Table'[Out]))
 
Sum of Max = SUMX(FILTER(ALL('Table'),'Table'[Key] = MAX('Table'[Key])),[MAX_IN_OUT Meausre])
 
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.