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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Summing a subtotal

Hello Community - 

 

I have two measures.   The goal of these measures was to total up Opportunities from our CRM system.   Specifically, to segment (and sum up) orders that are orders less than $75,000   and  to sum up orders that were equal to or greater than $75,000.  

 

However, the numbers being added up are not correct.    Here is an example of what my output should be: 

 

Opportunity Name     Opportunity Value

ABC                                  $125,000

DEF                                  $100,000

GHI                                  $50,000

JKL                                   $80,000

MNO                               $25,000

 

If I put these on a card visual, the 2nd measure (greater than 75k) should show a total of $305,000.   The first measure should show $75,000.     Again, the goal is to sum up the total values depending on their segmentation:   => 75k    or   < 75k

 

The "description" used in the measure formula, is the unique identifier of the opportunity.  

 

Total Oppy Less Than 75k = CALCULATE(SUMx(filter(summarize('AllOpps-Products','AllOpps-Products'[Description],"_net",sum('AllOpps-Products'[Extended Price])),[_Net]<75000),[_net]))
 
Total Oppy Equal or Greater 75k = CALCULATE(SUMx(filter(summarize('AllOpps-Products','AllOpps-Products'[Description],"_net",sum('AllOpps-Products'[Extended Price])),[_Net]>=75000),[_net]))
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous this is I will do

 

Sum Measure = SUM ( 'Table'[Value] )

Over 75K Measure = 
 SUMX ( VALUES ( 'Table'[Opp] ), IF ( [Measure 2] >= 75000, [Sum Measure] ) )

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



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

1 REPLY 1
parry2k
Super User
Super User

@Anonymous this is I will do

 

Sum Measure = SUM ( 'Table'[Value] )

Over 75K Measure = 
 SUMX ( VALUES ( 'Table'[Opp] ), IF ( [Measure 2] >= 75000, [Sum Measure] ) )

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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