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.
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
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
33 | |
18 | |
18 |