Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear all
I have 50 products. I need to show 6 of them in separate table, since they are from the different group.
Below you can find the sample of my table. I have problem with the total row of the table.
Total product amount is right. Unit price is calculated from the different amount by dividing the product amount.
We see 4 in the bottom of the table. Actually when we divide Amount for all 50 products we get 4. But in this table I don't need to see 4. My desired result is average unit price if its possible.
And total amount (the third column) is not the total of the related column but product amount x 4 which is wrong.
Please help me to calculate appropriate grand total by summing up the column values.
product amount | unit price | total amount | |
Product A | 235 | 145 | 34,075 |
Product B | 186 | 314 | 58,404 |
Product C | 269 | 462 | 124,278 |
Product D | 57 | 664 | 37,848 |
Product E | 1196 | 90 | 107,640 |
Product F | 620 | 799 | 495,380 |
Total | 2,563 | 4 | 10,252 |
Solved! Go to Solution.
Hi @OSS
You may try below measures.Attached the simplified sample file for your reference.
Price = SUM(Table2[total amount])/SUM(Table2[product amount])
Unit price = IF ( HASONEVALUE ( Table2[Product] ), [Price], AVERAGEX ( SUMMARIZE ( Table2, Table2[Product] ), [Price] ) )
Total = SUM ( Table2[product amount] ) * CALCULATE ( [Price], ALL ( Table2 ) )
Regards,
Cherie
Hi @OSS
You may try below measures.Attached the simplified sample file for your reference.
Price = SUM(Table2[total amount])/SUM(Table2[product amount])
Unit price = IF ( HASONEVALUE ( Table2[Product] ), [Price], AVERAGEX ( SUMMARIZE ( Table2, Table2[Product] ), [Price] ) )
Total = SUM ( Table2[product amount] ) * CALCULATE ( [Price], ALL ( Table2 ) )
Regards,
Cherie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |