Forum Discussion

Nawaz's avatar
Nawaz
Frequent Visitor
2 years ago
Solved

Measure have different result vs columns

I have a simple table consists of product price and quantity for each customer. I wanted to calculated total sales amount for each customer in two different ways just to explore the difference betwee...
  • rajendraongole1's avatar
    2 years ago

    Hi Nawaz We can do the calcualtion for total sales amount for each customer

     

    The measure SUM('Table'[Quantity]) * SUM('Table'[Price]) is incorrect because it sums the quantities and prices separately and then again multiplies these totals. This approach does not respect the row context thats why you are getting 275 abnormal value.

     

    calculated column to calculate Total sales: 

     

    Using measure: Total sales sum:

     

    With one single measure using sumx(iteration functions) you can create Total sales measure as follows: 

     

     

    In report view:

     

     

    Hope my explaination is clear. Thank you

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!