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 all,
I have a simple model of English Premier Legaue games.
A fact table with a line per game.
Dimensions a Calendar - with all dates and a season attribute.
At the moment I have a visualisation of a table as below and use
Season | Points | Season Rank | Team | Overall Rank | ||||
2017 -18 | 100 | 1 | Man City | ? 1 | ||||
2018 - 19 | 98 | 1 | Man City | ?2 | ||||
2018 - 19 | 97 | 2 | Liverpool | ?3 | ||||
2016 - 17 | 93 | 1 | Chelsea | ?4 | ||||
Hello @Anonymous
Give this a try.
Overall Rank =
VAR _table =
CALCULATETABLE(
SUMMARIZE('Home Team','Home Team'[Team],Dates[Season]),ALL(Dates),ALL('Home Team'))
RETURN
If(HASONEVALUE('Home Team'[Team]),RANKX(_table, [Total Point per Team]), Blank())
Thanks - I got this error though
I also tried
I think that is because the Date table is not joined to the Home Team table. Try this.
Overall Rank =
VAR _table =
CALCULATETABLE(
SUMMARIZE('Fixtures','Fixtures'[Team],Dates[Season]),ALL(Dates),ALL('Fixtures'))
RETURN
If(HASONEVALUE('Home Team'[Team]),RANKX(_table, [Total Point per Team]), Blank())
Thanks! Still not quite right. I am getting 1 for all rows now. The other all gave the same as the season rank? Your image sugegsted you gad it working in a model you have?
Thankyou
I did but it was just a sample that I discarded. Can you share your .pbix file?
Sorry for the late reply - I only have permissions on onedrive to share with internal or maybe an email address. Are there are alternatives I could use on this site? Thanks very much for your help.
You can create a DropBox account for free and put it there then share the link.
Thanks hopefully you can see this .
The table visual is on the last tab , and the last column in the table was the attempt to get the overall rank. Rather than rank per season which works.
Thanks.
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 |
---|---|
108 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |