Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Subtracting random rows in a table on a filter condition

I have a table, with following structure. Last column prices Diff is what I would like to extract . The table consists of multiple Source , The prices are captured from Source either in Actual Values or in differential. Source "A" is the base line, Source "B" Price should be reflected as difference from Source "A " e.g. For Month "A" = Month" B" , Price Diff should be , Price "A" - Price "B". prices for Source " C" since already available as differntial should get populated from Price column as is. Is it possible to achieve this using Subtraction function between rows in same table. Thanks fpr your help in advance 

 

Source PriceMonth Price Diff 
A32Jul-2032
A34Aug-2034
A36.5Sep-2036.5
A38.3Oct-2038.3
B33Aug-201
B32Sep-204.5
B37Oct-201.3
B32.5Nov-20-32.5
C0.23Jul-200.23
C2.35Aug-202.35
C-2.34Sep-20-2.34

 

 

  • Hi Anonymous , 

    You could refer to my sample for details.

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • dax's avatar
    dax
    Icon for Community Support rankCommunity Support

    Hi Anonymous , 

    You could refer to my sample for details.

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi dax, Zoe, Many thanks for your help. It worked just fine.

      However, I have a question, I noticed that you used Two Tables . The difference is extracted as a measure in Table (2) , so is there specific reason that you have summarized data in another table Table 2. 

       

      This could be too much to ask but if you could explain the measure that you have used. I wonder how you are moving between differnt rows , there isnt a counter used nor an index .

       

      Thanks Again