Forum Discussion

krzysztof's avatar
krzysztof
Icon for Helper III rankHelper III
4 years ago
Solved

Calculation group Add measure LY

I have a problem to add the LY measure in the Tabular Editor, which when selecting kpi “Units” will display the LY function from the measure “Units_LY” and when selecting KPI “Price” will display the measure “Price_LY”
Note: LY function is different for Units and Price measure

 

PBX: https://drive.google.com/file/d/1T5-UIX8LzcGf5gN_Vwl8RMp34dJsEQhk/view?usp=sharing&fbclid=IwAR1xOobIw6hrr-oGRszA8DHF1FdfYizFUMbDr6oPSWs9qoT10trL24sCls0 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi krzysztof ,

    Please try to create a measure with below dax formula and add it to the table visual

    Measure =
    VAR cur_kpi =
        SELECTEDVALUE ( 'New Calculation Group'[Name] )
    RETURN
        SWITCH ( cur_kpi, "Price", [Price_LY], "Units", [Units_LY] )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_ Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi krzysztof ,

    Please try to create a measure with below dax formula and add it to the table visual

    Measure =
    VAR cur_kpi =
        SELECTEDVALUE ( 'New Calculation Group'[Name] )
    RETURN
        SWITCH ( cur_kpi, "Price", [Price_LY], "Units", [Units_LY] )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_ Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.