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.
There is likely a simple solution to this but I cant seem to find it. I'd like to create a card that shows which product is the highest selling based on sales quantity.
For example
Transaction number | Product | Units Sold |
1 | Toy | 2 |
2 | Snack | 4 |
3 | Toy | 3 |
4 | Beverage | 1 |
5 | Snack | 5 |
In this case, id like to have a card that shows "Snack" given that in this table it has the largest quantity sold.
I'd also like to do the reverse, a card that shows the lowest selling product, so "Beverage"
Solved! Go to Solution.
pls try this
Measure =
VAR tbl=SUMMARIZE('Table','Table'[Product],"_sum",sum('Table'[Units Sold]))
VAR _max=maxx(tbl,[_sum])
return maxx(FILTER(tbl,_max=[_sum]),'Table'[Product])
Measure2 =
VAR tbl=SUMMARIZE('Table','Table'[Product],"_sum",sum('Table'[Units Sold]))
VAR _min=minx(tbl,[_sum])
return maxx(FILTER(tbl,_min=[_sum]),'Table'[Product])
Proud to be a Super User!
pls try this
Measure =
VAR tbl=SUMMARIZE('Table','Table'[Product],"_sum",sum('Table'[Units Sold]))
VAR _max=maxx(tbl,[_sum])
return maxx(FILTER(tbl,_max=[_sum]),'Table'[Product])
Measure2 =
VAR tbl=SUMMARIZE('Table','Table'[Product],"_sum",sum('Table'[Units Sold]))
VAR _min=minx(tbl,[_sum])
return maxx(FILTER(tbl,_min=[_sum]),'Table'[Product])
Proud to be a Super User!
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 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |