Forum Discussion

rawiswarden's avatar
rawiswarden
Icon for Helper I rankHelper I
6 years ago
Solved

Calculate Total Excluding Row Contribution

Hello,

 

If I have a simple table like this, where amount is a measure.  What is the DAX to get the total of column Amount excluding that row?

 

As you can see, the What If Amount is just the total (194) less the amount for each person.  But I can't figure this out and it must be something simple.

 

NameAmountWhat If Amount
A22172
B20174
C38156
D40154
E12182
F34160
G28166
H0194
Total194 

 

I did the calculation with something like this:

 

= CALCULATE( sum(Dimension_Dealer[B]), ALL(Dimension_Dealer)) - [Booked Count]

But I'm trying to do this all in a calculate or interator function to learn.  Thanks!
  • Hi rawiswarden 

    try a measure like

    Measure = 
    calculate(sum(Table4[Amount]);FILTER(ALL('Table4');Table4[Name]<>SELECTEDVALUE(Table4[Name])))

    do not hesitate to give a kudo to useful posts and mark solutions as solution

2 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi rawiswarden 

    try a measure like

    Measure = 
    calculate(sum(Table4[Amount]);FILTER(ALL('Table4');Table4[Name]<>SELECTEDVALUE(Table4[Name])))

    do not hesitate to give a kudo to useful posts and mark solutions as solution