Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello
I have a set of data, as below. I need to achieve the following:
Finally, I need the table/rank to change if my slicer of vendor, for example, changes.
Any ideas?
Thanks
Data example:
Customer Sales Vendor
a 100 a
a 100 a
a 100 a
b 100 b
b 50 a
b 100 b
c 10 c
c 50 a
c 100 a
d 90 b
d 20 c
d 60 a
e 100 c
e 75 b
e 50 b
f 40 a
f 90 c
f 75 b
Solved! Go to Solution.
@Anonymous
Hello @Anonymous,
you need to build the below simple model
and add the below measures:
TotalSales = SUM( Sales[Sales] )
Customer Rank =
IF(
COUNTROWS( Sales ) > 0,
VAR Ranking =
IF(
HASONEVALUE( Customers[Customer] ),
RANKX(
ALLSELECTED( Customers[Customer] ),
[TotalSales],,DESC
)
)
RETURN IF( Ranking < 3, Ranking, "Other" )
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
@Anonymous
Hello @Anonymous,
you need to build the below simple model
and add the below measures:
TotalSales = SUM( Sales[Sales] )
Customer Rank =
IF(
COUNTROWS( Sales ) > 0,
VAR Ranking =
IF(
HASONEVALUE( Customers[Customer] ),
RANKX(
ALLSELECTED( Customers[Customer] ),
[TotalSales],,DESC
)
)
RETURN IF( Ranking < 3, Ranking, "Other" )
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 45 | |
| 35 | |
| 30 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 38 | |
| 21 | |
| 21 |