Forum Discussion

Louis63's avatar
Louis63
New Member
3 years ago
Solved

Calculated column with differente table

Hello, I am looking to create a calculated column that gives the turnover generated per customer. Knowing that each sale made is in another table, how can I retrieve the amount of sales for a custom...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Louis63 ,

     

    You can try SUM() function.

    Turnover Generated =
    CALCULATE (
        SUM ( 'FACT_Sales 2019-2021'[Turnover] ),
        FILTER (
            'FACT_Sales 2019-2021',
            'FACT_Sales 2019-2021'[Customer Key] = EARLIER ( 'TableName'[Customer Key] )
        )
    )

     

    Best Regards,
    Rico Zhou

     

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