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 getting a issue where when i try to use RANKX to rank some data im getting duplicated values
Measure im using : rankx(allselected(Dados[Turmas/Ano]); calculate(SUMX(Dados;Dados[MódulosAtraso]));;;Skip)
Sample Data:
School NameofClass MódulosAtraso Rank
Porto Class1 900 1
Viseu Class10 560 1
Porto Class20 820 2
Viseu Class4 400 2
Expected Result would be:
School NameofClass MóduloAtraso Rank
Porto Class1 900 1
Porto Class10 820 2
Viseu Class20 560 3
Viseu Class4 400 4
OBS : Each school has unique ID for example :
SchoolID School
1 Porto
2 Viseu
Solved! Go to Solution.
@tex628 Thanks for all the help i already found a way to show the information i wanted so instead of using my SchoolName i used the ClassID and now its showing the results i wanted .
As my ClassID they have schools names abbreviated as for examples PORGpsi1619 , i made table with the abreviattions and the school names so in the meetups people can understand what the 3 first letters means
May try to use the following DAX, add more conditions in ALL functions
Rank = RANKX(ALL(School[NameofClass],School[School]),CALCULATE(SUM(School[MódulosAtraso])),,DESC)
@Anonymous hey thanks for the help but when i use your formula it gives me a error :
All column arguments of the ALL/ALLNOBLANKROW function must be from the same table.
This is my relationship if it helps :
Im going to translate the tables because they are in portuguese so table "Escola" = School where u have IdSchool and SchoolName
"Turmas"="ClassData" in this table is where i get have my table with all ids matching up .
"Dados" = "Class" where i have ClassName and MódulosAtraso
May I ask what is the purpose of creating this ranking, is it to filter on rank or simply to display the rank?
/ J
@tex628 the purpose of this rank is to show in meeting to show the top 5 class with more "MódulosAtraso" in our group of Schools , the ranks its already filter to show only top 5
@tex628 Hey i tried your method but it doens't filter top 5 neither gives me only top 5 as i would like as this :
School ClassName MódulosAtraso Rank
Porto Class1 900 1
Viseu Class1 760 2
Viseu Class90 750 3
Porto Class20 600 4
Porto Class19 550 5
Sorry i was away at lunch.
I think theres something im missing or missunderstanding, do you think you could provide a picture of your visuals?
/ J
@tex628 Thanks for all the help i already found a way to show the information i wanted so instead of using my SchoolName i used the ClassID and now its showing the results i wanted .
As my ClassID they have schools names abbreviated as for examples PORGpsi1619 , i made table with the abreviattions and the school names so in the meetups people can understand what the 3 first letters means
Hi @rui_silva
This calculated column matches your expected results
My Rank = RANKX('Table','Table'[MódulosAtraso])
Hey thanks for helping me but when i try use your function it gives me a error :
A single value for column 'MódulosAtraso' in table 'Dados' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
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 |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |