Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have the following data:
ID | Company | Value | Ranking in company | Total Ranking |
1 | A | 15 | 1 | 7 |
2 | A | 5 | 3 | 14 |
3 | A | 12 | 2 | 9 |
4 | B | 18 | 1 | 2 |
5 | B | 4 | 4 | 16 |
6 | B | 3 | 6 | 18 |
7 | B | 17 | 2 | 4 |
8 | B | 4 | 4 | 16 |
9 | B | 9 | 3 | 12 |
10 | B | 1 | 7 | 19 |
11 | C | 9 | 4 | 12 |
12 | C | 11 | 2 | 10 |
13 | C | 18 | 1 | 2 |
14 | C | 5 | 5 | 14 |
15 | C | 10 | 3 | 11 |
16 | D | 14 | 4 | 8 |
17 | D | 20 | 1 | 1 |
18 | D | 16 | 3 | 6 |
19 | D | 1 | 5 | 19 |
20 | D | 17 | 2 | 4 |
I know how to create a calculated column for the total ranking (the "Total Ranking" column) but i need to rank these rows with a calculated column inside each company (the "Ranking in company column"). What i tried has mostly resulted in giving the same rank to all the items.
Thanks.
Solved! Go to Solution.
Hey @cdcphist ,
you can filter the table that has to be considered to the current row context company.
Try the following calculated column:
Rank company =
VAR vRowCompany = myTable[Company]
VAR vFilterTable = FILTER( myTable, myTable[Company] = vRowCompany )
RETURN
RANKX( vFilterTable, myTable[Value] )
Hi, @cdcphist
I am not sure if I understood your question correctly but please check the below picture and the sample pbix file's link down below.
Rank in Each Company CC =
VAR currentcompany = 'Table'[Company]
RETURN
RANKX ( FILTER ( 'Table', 'Table'[Company] = currentcompany ), 'Table'[Value] )
https://www.dropbox.com/s/yseko7od474icwa/cdcphist.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hey all,
I tried that measure as well on Area, but i have the error below.
is there something i do wrong?
The Area column indeed is a text one.
Hi, @Simona0926
I am not sure whether you want to create a new measure or a new column.
Share your sample pbix file's link here with how your desired outcome looks like.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I want to create a new measure fo the "Cancellation Rate" visual.
When I choose the status "cancelled" for example i need to see the rate of the status calculated for each Area (actually i need something similar to the table calculation " % of Row total").
You have here the link to the PBI as well.
Hi, @Simona0926
Sorry that I cannot understand what is the relationship between the initial question of this post and your question.
Anyway, I cannot open your link. I think it is linked to the power bi service, not the file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @cdcphist
I am not sure if I understood your question correctly but please check the below picture and the sample pbix file's link down below.
Rank in Each Company CC =
VAR currentcompany = 'Table'[Company]
RETURN
RANKX ( FILTER ( 'Table', 'Table'[Company] = currentcompany ), 'Table'[Value] )
https://www.dropbox.com/s/yseko7od474icwa/cdcphist.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hey @cdcphist ,
you can filter the table that has to be considered to the current row context company.
Try the following calculated column:
Rank company =
VAR vRowCompany = myTable[Company]
VAR vFilterTable = FILTER( myTable, myTable[Company] = vRowCompany )
RETURN
RANKX( vFilterTable, myTable[Value] )
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.
Works great. Thank you.
User | Count |
---|---|
119 | |
78 | |
59 | |
52 | |
48 |
User | Count |
---|---|
171 | |
117 | |
61 | |
59 | |
53 |