Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I am trying to calculate the total price as shown below.
DAX measure i am using is = sum(quantity) * sum(price)
Instead of caluclating this way : (10 *4) + (20*5) + (30*6)
i am getting total based on this logic: (10+20+30) * (4+5+6)
How to create a measure for this logic
(10 *4) + (20*5) + (30*6)
I only need to show the entire total.
| Category | Name | Quantity | Price | Total | |
| Fruits | Apple | 10 | 4 | 40 | |
| Fruits | orange | 20 | 5 | 100 | |
| Fruits | banana | 30 | 6 | 180 | |
| 320 | Expected Outcome | ||||
| 60 | 15 | 900 | This is outcome i am getting in Power BI |
Solved! Go to Solution.
Hi @Sandhya877
to force summing the visible values
Measure =
SUMX (
SUMMARIZE ( 'Table', [Category], [Name] ),
CALCULATE ( SUM ( [Quantity] ) * SUM ( [Price] ) )
)
Hi @Sandhya877
to force summing the visible values
Measure =
SUMX (
SUMMARIZE ( 'Table', [Category], [Name] ),
CALCULATE ( SUM ( [Quantity] ) * SUM ( [Price] ) )
)
Thank you. It worked.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 18 | |
| 12 | |
| 11 | |
| 6 | |
| 6 |