Forum Discussion

Sudharsanan's avatar
Sudharsanan
Helper III
3 years ago
Solved

Calculated column to have same value in both Rows

Hi friends, i have below scenerio where we have Qty for 2021 and 2022 for same product. i need to have the 2022 qty in a new colum in both the rows.   Thanks for your support
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Sudharsanan ,

     

    Please try

    2022-QTY = 
    CALCULATE (
        SUM ( 'Table'[Qty] ),
        FILTER ( ALL ( 'Table'[SALES_Year] ), 'Table'[SALES_Year] = 2022 ),
        ALLEXCEPT ( 'Table', 'Table'[SALES_Mel] )
    )

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data