This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I tried to write DAX expression in TOM Model to get the rank based on three categories but didn't got solution.
Ex: There are 2 schools and each schools have different year and each year have date.Table contains other columns as well but I need rank on three columns.
Please share any idea.
Solved! Go to Solution.
HI @Anonymous,
According to your description and snapshot, you want to rank datevalue based on current 'schoolid' and 'yearid' category, right?
If this is a case, you can try to use following calculated column formula:
RANK =
COUNTROWS (
FILTER (
ALL ( Table ),
Table[SchoolId] = EARLIER ( Table[SchoolId] )
&& [YearId] = EARLIER ( Table[YearId] )
&& Table[DateValue] < EARLIER ( Table[DateValue] )
)
)
+ 1
Regards,
Xiaoxin Sheng
pls share sample data structure of your database , mainly that three column should would availble in data structure.
Thanks.
Hello,
pls tell me the field name on which you want to rank.
Ex. Strength of student in schools, Achievement of schools etc,
so on what basis you want a rank ?
Thanks! I have highlighted in screenshot.
SchoolId, YearID, and DateValue
Hello @Anonymous,
pls send me the output you want for your data pls just type it in excel and send me that, so i can understand what you exactly want.
I'm looking for RANK field which is in attached screenshot.
Hello @Anonymous,
hope you Have you got your solution.
Thanks! @AnonymousAbove DAX expression is helped me.
Thanks! @Anonymous
HI @Anonymous,
According to your description and snapshot, you want to rank datevalue based on current 'schoolid' and 'yearid' category, right?
If this is a case, you can try to use following calculated column formula:
RANK =
COUNTROWS (
FILTER (
ALL ( Table ),
Table[SchoolId] = EARLIER ( Table[SchoolId] )
&& [YearId] = EARLIER ( Table[YearId] )
&& Table[DateValue] < EARLIER ( Table[DateValue] )
)
)
+ 1
Regards,
Xiaoxin Sheng
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 47 | |
| 27 | |
| 23 | |
| 18 |