Unit Price in Product and in Sales tables

  • Unit Price in Product and in Sales tables

    Posted by DSC Communities on May 2, 2020 at 9:22 am
    • GĆ©rard Ducouret

      Member

      May 2, 2020 at 9:22 AM

      Hi,
      I’m trying to understand how the Power BI Desktop tables are working.
      The “Unit Price” field is displayed in 2 tables : “Product” and “Sales“.
      In a matrix, I have the Product name column .
      I drag n drop the “Unit Price” from “Sales” and I replace Count by Sum: it displays $2398,80
      I drag n drop the “Unit Price” from “Product”Ā and I replace Count by Sum: it displays $199,9
      I checked that in the data base the true “Unit Price” is $199,9. So “Sales” displays a “Unit Price” 12 times too big.
      I checked that 12 is not the Quantity : The Quantity is 16.
      12 is the number of order rows…..
      What is the logic in these calculations ?
      Thanks for your help

      ——————————
      GƩrard Ducouret
      ——————————

    • Cekou C.

      Member

      May 2, 2020 at 3:53 PM

      Hi

      I assume Sales is on the many side of the relationship with the product table with, I assume, a one-way relationship.

      I think it has something to do with the fact that Sales table cannot filter Back Category from the Product table.

      Kr,

      ——————————
      Cekou C.
      Accounting Supervisor & PBI Enthusiast
      ——————————
      ——————————————-

    • Audrey Abbey

      Member

      May 2, 2020 at 6:50 PM

      When you use the Unit Price from Sales, and select SUM as the aggregator, it is adding up every instance of the unit price found in sales.Ā 
      So if you had 12 sales records for the product, you would get 12 * the unit price.Ā 

      You can use the unit price from sales, but you would need to use MIN or MAX (they should be the same) for the aggregation instead of SUM.Ā 
      Or, if you have multiple prices for a given product, you can use AVERAGE.

      If you use the unit price from Product, that Product only occurs once in that table. So, there is nothing to SUM, and you get the correct 199.99

      Does that make sense?

      ——————————
      Audrey Abbey
      SR. BI Developer/Analyst
      LeapFrogBI
      Portland OR
      ——————————
      ——————————————-

    • GĆ©rard Ducouret

      Member

      May 4, 2020 at 9:33 AM

      Thanks Audrey,
      Yes, that make sense for me now !

      ——————————
      GƩrard Ducouret
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Unit Price in Product and in Sales tables’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!