Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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]))
  • 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!

1 Reply

  • 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!