Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Community,
I have a table called "MyTable" with 3 columns (Category, SubCategory, Date)
I added a column using this DAX code to rank subcategories within each group by date:
MyRanking=
RANKX(FILTER(ALL(MyTable),
MyTable[Category] = EARLIER(MyTable[Category])
),
MyTable[Date],,,Dense)
Here are the faces issues :
1. for some categories I get the same ranking when subcategories have the same date
2. for some categories some ranking numbers are missing.
Any suggestions?
Thank you in advance
@DataVitalizer , for column try like
MyRanking=
RANKX(FILTER((MyTable),
MyTable[Category] = EARLIER(MyTable[Category])
MyTable[SubCategory] = EARLIER(MyTable[SubCategory])
),
MyTable[Date],,asc,Dense)
For measure you can use new rank or rownumber
rank(DENSE,ALLSELECTED(MyTable[Category],MyTable[SubCategory],MyTable[Date]),ORDERBY([Date],asc))
add partitionBy if needed
This time I had only one value for all subCategories "1"
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.