Forum Discussion

ShyamS's avatar
ShyamS
Frequent Visitor
2 years ago
Solved

Subtract one column value to each column values in same row

 Hi All, As per my business requirements I have to subtract current year (actual) column values to all the other column(MAR_FCST,PLAN, ACTUAL (2023)) values as shown in the matrix visuals. I a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ShyamS 

     

    Given that I don't understand the structure of your specific data, I can only give you some suggestions that might be useful:

    Maybe you can change your measure into this:

    GTN % GS ~ =
    VAR A = [GTN % GS]
    VAR CurrentDate =
        MAX ( CV_GMR_PL_APAC_REPORT[Year] )
    VAR B =
        CALCULATE (
            [GTN % GS],
            CV_GMR_PL_APAC_REPORTING[Year] = YEAR ( CurrenDate ),
            CV_GMR_PL_APAC_REPORTING[Scenario] = "ACTUAL"
        )
    VAR C = ( ( A - B ) * 10000 )
    RETURN
        C

    Hope it helps,

     

    Best Regards

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