Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
| Date | Category | 1DaySales | Rank | percent rank |
| 4/6/2021 | Equity | 123 | 4 | 100 |
| 4/6/2021 | Equity | 345 | 3 | 75 |
| 4/6/2021 | Equity | 567 | 2 | 50 |
| 4/6/2021 | Equity | 789 | 1 | 25 |
| 4/6/2021 | Commodity | 453 | 2 | 100 |
| 4/6/2021 | Commodity | 564 | 1 | 50 |
| 4/6/2021 | Currency | 234 | 1 | 100 |
| 4/5/2021 | Equity | 256 | 3 | 75 |
| 4/5/2021 | Equity | 0 | 4 | 100 |
| 4/5/2021 | Equity | 345 | 2 | 50 |
| 4/5/2021 | Equity | 754 | 1 | 25 |
| 4/5/2021 | Commodity | 683 | 1 | 100 |
| 4/5/2021 | Commodity | null | ||
| 4/5/2021 | Currency | 246 | 3 | 300 |
I want to calculate rank and percent rank
In report i have slicer Date, Category
Ranking is based on 1daysales by the selection of date and category
percent rank forumula= ranking*100/counta(1daysales)
Note :- if its blank dont assign rank and percent rank
Solved! Go to Solution.
@Anshenterprices , Create two measures like
Rank = rankx(filter(allselected(Table[DAte], Table[Category]), [Category] =max([category]) ), calculate(sum(table[1DaySales])))
count Day = calculate(count(Table[Date]), filter(allselected(Table), Table[Date] = max(Table[Date]) && Table[category] = max(Table[category]) ))
and then %
% = divide([Rank], [count day])
@Anshenterprices , Create two measures like
Rank = rankx(filter(allselected(Table[DAte], Table[Category]), [Category] =max([category]) ), calculate(sum(table[1DaySales])))
count Day = calculate(count(Table[Date]), filter(allselected(Table), Table[Date] = max(Table[Date]) && Table[category] = max(Table[category]) ))
and then %
% = divide([Rank], [count day])
@amitchandak thank you
forgot to mentioned in the post, In a table there is also one column i.e. online/offline category ,
I have used online/offline category as a Slicer in the report,but dont want seperate raking and percent rank once i select online or offline category. it should be same in both ways
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 |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |