Forum Discussion

bi_analytics's avatar
bi_analytics
Frequent Visitor
4 years ago
Solved

SUMX Total Different from Displayed Row Values

Dear Power BI friends. I have a scenario where I can't figure out why SUMX gives me a different total than the sum of the rows displayed in the table.   I have made a simplified example to illustr...
  • parry2k's avatar
    4 years ago

    bi_analytics this is what you need to fix, to understand why it giving the funny result, stay tuned for my upcoming video based on this post:

     

    Amount per Customer = 
    
    VAR _Table =
    ADDCOLUMNS(
        DISTINCT(Orders[Customer ID]),
        "Amount",
        CALCULATE(SUM(Orders[Amount]))
    )
    
    RETURN
    SUMX(_Table, [Amount])

     

     

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.