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.
Hi,
I have a test dataset for which I created a ranking like this:
hi @dats - you can list all column want to be included in the RankX function in the highlighted section - the rank will be calculated based on the columns mentioned in the highlighted section in the below screenshot
Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue. Thanks!
Proud to be a Super User!
Rating is just a product rating 1,2,3 or so
Then Rating itself Ranking! I am confused. Is ranking and Rating are same or two different things and how different
Proud to be a Super User!
Need to understand what is Rating?!
Proud to be a Super User!
@dats ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.
@amitchandak of course 🙂
Date | Products | Category | Product Rating |
01.01.2020 | P1 | Care | 1 |
01.01.2020 | P1 | Care | 3,5 |
.... | P1 | Care | 4 |
The output at the moment would be below whereas the category can be choosen through the visual filters.
Rank | Product | Rating |
1 | p1 | 1 |
1 | P2 | 3,5 |
if i take out the rating column in my output it works as expected:
Rank | Product |
1 | p1 |
2 | P2 |
@dats , Not very clear.
But understand the context. you have Rank on all product
rankx(all(Table[Product]),[Sum of sales])
When I view it by(Only product on row/axis) product, I will see product rank. When I add a category column (any un summarized column ) then it will display product raking inside that category.
If your Rating is un summarized or does not have aggregation then Ranking will be done for the product inside the Rating
example
City Rank = RANKX(all(Geography[City]),[Sales]) // with City Id shows Rank 1
Geography Rank = RANKX(all(Geography),[Sales]) // Work with City ID as that is a lowest level along with city
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales]) // Work with City ID
Can you share sample output in table format?
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
Ok I see.Sorry for the confusion. I have uploaded my pbix testfile https://ufile.io/i0voo99k
The rank is the Rank cacluated by the amount a product has been displaye in example. Products are my Products and the ranking is in example average user ratings.
What I would like to acomplish is that I can display the ratings (as stars) next to the ranked products without RANKX taking the column "ranking" into account when it is calculating the rank of a product. Also I would like to choose the category filter in the visual filter panel
Hi @dats,
AFAIK, current power bi does not support creating a dynamic calculated column/table based on filter/slicer. Please use the measure formula instead.
BTW, can you please share this sample file to onedrive for business, I can't download the sample data from third part web driver.
Regards,
Xiaoxin sheng
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |