Forum Discussion
Summarize and Rank by multiple columns and rows
- 8 years ago
You may use SUMMARIZE Function to add a calculated table and then use RANKX Function to add a calculated column. The post below is for your reference.
- 8 years ago
create a summarize table, go to modelling tab, click new table and add following:
TableSummarize = SUMMARIZECOLUMNS(Table1[Client Name], Table1[Revenue Stream], "Total Revenue", SUM(Table1[Total Revenue]) )
Now in above table, add new calculated field for rank:
Rank = RANKX(Filter(TableSummarize, TableSummarize[Revenue Stream] = EARLIER(TableSummarize[Revenue Stream])),TableSummarize[Total Revenue],,DESC,Dense)
You may use SUMMARIZE Function to add a calculated table and then use RANKX Function to add a calculated column. The post below is for your reference.
- Kitkat8 years agoFrequent Visitor
I have tried the following function:
Summarize
Please advise where my error is
Thanks kindly and truly appreciate the help
Cheers
Kat
- parry2k8 years ago
Super User
create a summarize table, go to modelling tab, click new table and add following:
TableSummarize = SUMMARIZECOLUMNS(Table1[Client Name], Table1[Revenue Stream], "Total Revenue", SUM(Table1[Total Revenue]) )
Now in above table, add new calculated field for rank:
Rank = RANKX(Filter(TableSummarize, TableSummarize[Revenue Stream] = EARLIER(TableSummarize[Revenue Stream])),TableSummarize[Total Revenue],,DESC,Dense)
- Kitkat8 years agoFrequent Visitor
Hi v-chuncz-msft- greatly appreciate you pointing me in right direction and more information for the toolkit.
Cheers
Kat
- Kpavanteja917 years agoRegular Visitor
Rank = RANKX(CROSSJOIN(ALLSELECTED(Table[Client Name]),ALLSELECTED(Table[Revenue Stream])),CALCULATE(SUM(Total Revenue)))
- Anonymous5 years agoNot applicable
I need Top N Locations based on their sum of scores and ordered by the sum of Total Loss amount, and want to the locations to be ranked for the records where their sum of Toptal Loss amount is not blank, I am able to get the ranked locations based on sum of Total Loss amount but not able to get their sum of scores(of Ranked locations), I am getting al the locations, please help.
Measure =var RankingDimension = values('Table'[Location name])VarRankingSelect = selectedvalue('Top N RG'[Top N RG])var ranking2 = if(isblank(calculate(sum('Table'[Total Loss]))), blank(),rankx(filter(All('Table'[Location name]), not(isblank(calculate(sum('Table'[Total Loss]))))),calculate(sum('Table'[Total Loss])),, desc,skip))returnranking2