Forum Discussion
PowerBI-Newbie
1 year agoHelper IV
Dynamic Index/Rank (1st, 2nd, 3rd) on Graphs
I have the following graph on 3 separate pages of a Power BI report showing the breakdown of a category and sub-category: The idea is that each page will represent a location (dynamic) b...
- 1 year ago
Here is an example of using RANK which allows you to rank by more than one column.
R = var a = ADDCOLUMNS(ALLSELECTED('Table'[Location]),"c",CALCULATE(COUNTROWS('Table'),REMOVEFILTERS('Table'[Asset Type],'Table'[Sub-Type]))) return rank(DENSE,a,ORDERBY([c],DESC,[Location],ASC))is that what you are looking for?
lbendlin
1 year agoSuper User
Here is an example of using RANK which allows you to rank by more than one column.
R =
var a = ADDCOLUMNS(ALLSELECTED('Table'[Location]),"c",CALCULATE(COUNTROWS('Table'),REMOVEFILTERS('Table'[Asset Type],'Table'[Sub-Type])))
return rank(DENSE,a,ORDERBY([c],DESC,[Location],ASC))
is that what you are looking for?
PowerBI-Newbie
1 year agoHelper IV
Thank you very much lbendlin, this is what I'm looking for.