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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mohammadshareef
Frequent Visitor

calculating the Sum of the highest values for each “ID”

Regards,

I need your support on the following matter:

I have a table of clients’ names after adding Queries Edits.

 Tools used: Slicer for Receive Date & #Round columns.

I need support in calculating the Sum of the highest values in “Quantity Column” for each “ID”

 

 

Untitled.png

 

 

 

 

 

 

 

 

 

 

 

 

Example (Before Filter):

The highest value in “Quantity” for “ID: 1” is “ 7 ”

The highest value in “Quantity” for “ID:2” is “ 9 ”

The highest value in “Quantity” for “ID:3” is “ 4 ”

The highest value in “Quantity” for “ID:4” is “ 4 ”

The result I want to have is ( 7 + 9 + 4 + 4 = 24 ).

 

Example (With Filter): Using Filter for “Receive Date” for “1/1/2016, 2/1/2016”

The highest value in “Quantity” for “ID: 1” is “ 5”

The highest value in “Quantity” for “ID:2” is “ 8”

The highest value in “Quantity” for “ID:3” is “ 4 ”

 

The result I want to have is ( 5 + 8 + 4 = 17 ).

 

Thank you for your support.

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Hi Mohammed

 

Try this measure,

 

SumOfMaxes:=SUMX(
VALUES(Table1[ID])
,CALCULATE( MAX(Table1[Quantity]) )
)

 

and 

 

SumOfMaxesfor2:=SUMX(
VALUES(Table1[Receive Date])
,CALCULATE( MAX(Table1[Quantity]) )
)

 

Hope this would solve your problem.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

2 REPLIES 2
BhaveshPatel
Community Champion
Community Champion

Hi Mohammed

 

Try this measure,

 

SumOfMaxes:=SUMX(
VALUES(Table1[ID])
,CALCULATE( MAX(Table1[Quantity]) )
)

 

and 

 

SumOfMaxesfor2:=SUMX(
VALUES(Table1[Receive Date])
,CALCULATE( MAX(Table1[Quantity]) )
)

 

Hope this would solve your problem.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Many thankssssssssssss Smiley Wink

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.