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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hey guys,
I'm a newbie and I'd really appreciate some help. I have an Orders Table and there's a column called Discount (that refers to the discount offered for the whole order) and this value is repeated in all of that order's lines. Ex
Order No | Product | Value | Discount
1 | A | 30 | $ 10
1 | B | 500 | $ 10
1 | C | 50 | $ 10
2 | A | 30 | $ 20
2 | B | 500 | $ 20
As you can see, in order 1 there are 3 different items, but order 1 had a total Discount of only $ 10, not $ 30. When I use Average, it works fine for each order, but as for the total, the result I wanted was $ 10 (first order) + $ 20 (second order) = $ 30 (total discount), but I get the $ 18, which is the average for the Discount field.
I Also tried it with Max and, again, it works fine for each order, but fails to show me the Total I wanted.
How should I approach this problem?
Thank you very much in advance.
Hi @vmlb,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @vmlb,
How about creating a discount table like below?
Order No | Discount
1 | 10
2 | 20
Best Regards,
Dale
Hi,
Drag Order to the row labels and write this measure
Discount=IF(HASONEVALUE(Data[Order No]),MIN(Data[Discount]),SUMX(SUMMARIZE(VALUES(Data[Order No]),[Order No],"ABCD",MIN(Data[Discount])),[ABCD]))
Hope this helps.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |