Forum Discussion

GQinBURQUE's avatar
GQinBURQUE
Regular Visitor
9 years ago
Solved

Subtracting a curve

Hi,

 

I am guessin this is a simple task, but have yet to get it working.  I have a measure, and the total of the measure is -8.08, and iI'd like to subtract that value from each row within a table.  Baiscally, I have two dynamic columns, and the difference of the averages of each needs to be subtracted form each of the values that were part of the calculated average.  I hiope the below will draw a clearer picture.  At the end, i need to be able to subtract the difference of two dyanamic averages of two different columns in two different tables, from the original individual values of one of the columns, whcih in essence will create a new column.  Essentially i need to create a curve.

 

name1num 1Num - Value = XName 20num 1 bNum - Value = X
name2num 2Num - Value = XName 21num 2 BNum - Value = X
name3num 3Num - Value = XName 22num 3 BNum - Value = X
name4num 4Num - Value = XName 23num  4 BNum - Value = X
name5num 5Num - Value = XName 24num 5 BNum - Value = X
name6num 6Num - Value = XName 25num 6 BNum - Value = X
name7num 7Num - Value = XName 26num 7 BNum - Value = X
name8num 8Num - Value = XName 27num 8 BNum - Value = X
name9num 9Num - Value = XName 28num 9 BNum - Value = X
name10num 10Num - Value = XName 29num 10 BNum - Value = X
name11num 11Num - Value = XName 30num 11 BNum - Value = X
AverageAverage of Num AverageAverage of Num B 
      
Value = Average of Num - Average of Num B     
  • Soooo...the issue I see with this is that your row context is going to be enforced on your measure. In other words, your measure will be calculated within the row context. So, you will need to wrap your measure in your column calculation in a CALCULATE with an ALL or ALLEXCEPT filter most likely. Basically, you need to implicitely specify the same filter context where you get your -8.08 value.

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Soooo...the issue I see with this is that your row context is going to be enforced on your measure. In other words, your measure will be calculated within the row context. So, you will need to wrap your measure in your column calculation in a CALCULATE with an ALL or ALLEXCEPT filter most likely. Basically, you need to implicitely specify the same filter context where you get your -8.08 value.

    • GQinBURQUE's avatar
      GQinBURQUE
      Regular Visitor

      Thank You.  I was able to get it completed.   Nice work!!