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.
Hello All!
I've got what I feel is a very simple problem but I can't quite figure out how to fix it. Below is a sample Dataset. I am trying to take the normal price - the discount price, then multiply that by the units sold to get the total discount. When I have it in a table, it works. When I put it in a card, the numbers go crazy. I am using the two measures below. What I want is a card that totals the "Total Discount" column which would be $6,765. What I am getting is $182,951 (the sum of discounts - $12 x total units - 15,246). Please help!
Item | Average Unit Price | Discount Price | Unit Price - Discount | Quantity | Total Discount |
1 | $ 15.00 | $ 14.00 | $ 1.00 | 210 | $ 210 |
2 | $ 20.00 | $ 19.00 | $ 1.00 | 2,077 | $ 2,077 |
3 | $ 19.00 | $ 18.00 | $ 1.00 | 3,280 | $ 3,280 |
4 | $ 10.00 | $ 10.00 | $ - | 7,411 | $ - |
5 | $ 23.00 | $ 22.00 | $ 1.00 | 35 | $ 35 |
6 | $ 21.00 | $ 21.00 | $ - | 309 | $ - |
7 | $ 24.00 | $ 23.00 | $ 1.00 | 85 | $ 85 |
8 | $ 40.00 | $ 39.00 | $ 1.00 | 1,003 | $ 1,003 |
9 | $ 46.00 | $ 46.00 | $ - | 802 | $ - |
10 | $ 66.00 | $ 62.00 | $ 4.00 | 4 | $ 15 |
11 | $ 54.00 | $ 52.00 | $ 2.00 | 30 | $ 59 |
Solved! Go to Solution.
@calen , I think it should be like
Discount Amount =
SUMX(Table, ([Unit Price] - [Discount Price])*[Quantity])
@calen , I think it should be like
Discount Amount =
SUMX(Table, ([Unit Price] - [Discount Price])*[Quantity])
@amitchandak Thank you for your help! The unit price comes from the item table, the discount price comes from the pricing table table, and the quantity comes from the sales table. Is there a way to bring all three tables into the measure above?
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 |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |