Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
We have a list of products and respective calculation. I need to fetch the top 3 categories on the basis of ranking of the products' calculation. Then create 3 separate graphs with top 3 products values, as given below:
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, I create a sample.
Here's my solution. For example, your logic for sorting products is total sales.
1.Create a calculated column Rank.
Rank =
RANKX (
ALL ( 'Table' ),
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Category] = EARLIER ( 'Table'[Category] ) ),
'Table'[Sales]
),
,
DESC,
DENSE
)
Get the rank column.
2.Put date and sales in a column chart, for the best selling, put Rank into the visual filter and select the value is 1.
In the same way, for the 2nd most selling, select the visual filter to 2. For the 3rd most selling, select the visual filter to 3. Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, I create a sample.
Here's my solution. For example, your logic for sorting products is total sales.
1.Create a calculated column Rank.
Rank =
RANKX (
ALL ( 'Table' ),
SUMX (
FILTER ( ALL ( 'Table' ), 'Table'[Category] = EARLIER ( 'Table'[Category] ) ),
'Table'[Sales]
),
,
DESC,
DENSE
)
Get the rank column.
2.Put date and sales in a column chart, for the best selling, put Rank into the visual filter and select the value is 1.
In the same way, for the 2nd most selling, select the visual filter to 2. For the 3rd most selling, select the visual filter to 3. Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , best is to use a visual level filter on the rank
Create a rank like this and then use filter
Rankx(allexcept(Table, Table[Product]),[sales],,desc,dense)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
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 |
|---|---|
| 55 | |
| 34 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 38 | |
| 35 | |
| 25 |