Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey guys, just wondering what dax synthax would be the best to find the quantity sold per product when unit net price = max(unit price)
Solved! Go to Solution.
Try this:
=
VAR MaxUnitPrice =
MAX ( Table[UnitPrice] )
VAR Result =
SUMX (
VALUES ( Table[ProductName] ),
CALCULATE ( SUM ( Table[Quantity] ), Table[UnitPrice] = MaxUnitPrice )
)
RETURN
Result
Try this:
=
VAR MaxUnitPrice =
MAX ( Table[UnitPrice] )
VAR Result =
SUMX (
VALUES ( Table[ProductName] ),
CALCULATE ( SUM ( Table[Quantity] ), Table[UnitPrice] = MaxUnitPrice )
)
RETURN
Result
@cdawidow , Try like
calculate(sum(Table[qty]), filter(allselected(Table),Table[product] =max(Table[product]) && Table[product] =max(Table[price])))
Can you share sample data and sample output in table format?
Hi @cdawidow ,
Please detai your issue here. It's hard to understand what you are asking.
Refer following link on how to get your questions answered:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks,
Pragati
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |