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
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 —————————— ——————————————-
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
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!