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

Maximum of Sum

HI,

 

I have data in theformat below: 

I want to calculate the sum of errors by reason and find the reason with maximum sum (The data has multiple rows for same error and source). I tried applying SUMMARIZE function but that doesnt seem to be working. Any help is appreciated!

 

Thanks in Advance!! 🙂

 

Source  NumberReasonCount of Errors
1Null ID1
1Null ID1
1Invalid ID1
1Invalid ID1
2Null ID1
2Null ID1
2Invalid ID1
2Invalid ID1
3Null ID1
3Invalid ID1
3Invalid ID1

 

1 ACCEPTED SOLUTION

@Anonymous

 

I thought you need max category, here is to measure to get the numbers

 

Max Reason 2 = MAXX(  ALL(Data[Reason]) , [Sum of Errors] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
dujos
Helper I
Helper I

Hello anshi1106,

 

complementing what 

 

 

 

parry2k
Super User
Super User

@Anonymous

 

Try following:

 

add new measures :

 

Sum of Errors = SUM( Data[Count of Errors] )

to get top reason , add another measure

 

Max Reason = TOPN(1, ALL( Data[Reason]), [Sum of Errors], DESC )

Put "Max Reason" measure in card visual and that will do it.

 

Cheers!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi Parry2k,

 

Thanks for the help, but the solution is giving me the reason (Invalid ID) and not the number for the reason (The number of times it occurs in the data). I need number 6 in the card and not Invalid ID. How to get that?

 

Thanks

Hi @Anonymous,

 

Try this

Sum Error = SUM(Table1[Count of Errors])

 

Add this to your card and in the visual filter, have a Top 1 of Reason based on Sum Error

 

image.png

@Anonymous

 

I thought you need max category, here is to measure to get the numbers

 

Max Reason 2 = MAXX(  ALL(Data[Reason]) , [Sum of Errors] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.