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
Anonymous
Not applicable

Calculate sum of max value

Hi,

 

We are making a notification report, but we are struggling with the following formula.

We want the sum of the max days open per notification.

A notification can appear multiple times in the dataset, we want to count only once the days open per notification and then take the sum over all notifications.

 

Example.png

We've tried the following measures they don't return the required result:

 

SUMX(GROUPBY(Table;Table[Notification]; "Notification Summarized";SUMX(CURRENTGROUP();Table[Days claim open]));AVERAGE(Table[Days claim open]))

 

SUMX(DISTINCT(Table[Notification]);CALCULATE(AVERAGE(Table[Days claim open])))

 

Thanks for helping us out!

 

Valérie

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous try using all except

 

1)  Max Days claim open = CALCULATE(MAX[Days claim open or Days open), ALLEXCEPT(Notification))

2) in the card or table just drop the Max Days claim open field it should sum it up by default.

View solution in original post

Anonymous
Not applicable

All,

 

Inspired by the comment of @Anonymous, we've found the solution:

 

 SUMX(DISTINCT(zClaimsQuery[Notification]);CALCULATE(AVERAGE(zClaimsQuery[Days claim open]);ALLEXCEPT(zClaimsQuery;zClaimsQuery[Notification])))

 

Thanks for the help!

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hello,

 

I Have problem ,  I have a chart bar when i want show max of the summary for Stage, but show max of column

 

Phone.PNGphone2.PNG

 

help me!!

Anonymous
Not applicable

@Anonymous try using all except

 

1)  Max Days claim open = CALCULATE(MAX[Days claim open or Days open), ALLEXCEPT(Notification))

2) in the card or table just drop the Max Days claim open field it should sum it up by default.

Anonymous
Not applicable

Hi @Anonymous,

 

Thank you for the reply, but this is not exactly want we want to achieve as the total sum in a table with notification in the rows is incorrect.

 

Hi @Anonymous,

 

If it is convenient, could you share some data sampe and your desired output so that we could understand your requirement better and get the solution?

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

All,

 

Inspired by the comment of @Anonymous, we've found the solution:

 

 SUMX(DISTINCT(zClaimsQuery[Notification]);CALCULATE(AVERAGE(zClaimsQuery[Days claim open]);ALLEXCEPT(zClaimsQuery;zClaimsQuery[Notification])))

 

Thanks for the help!

Hi @Anonymous,

 

Congratulations!

 

Only thing that you'll have to notice, just always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.