Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

add RANKX to current dax measure

Hi Experts

 

have a little trouble in added rankx to the current measure...so the 1/7/2019 is value 1 and the oldest date 36..

Table 2 = ADDCOLUMNS(FILTER(CALENDAR(MIN(PMS_FINANCIAL_PDS[Month Start]),MAX(PMS_FINANCIAL_PDS[Month Start])),DAY([Date]) =1),
        "CountComplaints", CALCULATE(COUNTA(PMS_COMPLAINT[MATERIAL_ID]),
            FILTER(PMS_FINANCIAL_PDS,PMS_FINANCIAL_PDS[Month Start].[Year] = YEAR(EARLIER([Date]))
                && PMS_FINANCIAL_PDS[Month Start].[MonthNo] = MONTH(EARLIER([Date]))))+0)
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Xiaoxin Sheng

I have managed to solve the problem using the following DAX and Amend my orginial DAX formula. Much Appericated for all the support you guy provide.

Index = 
RANKX(
    PMS_FINANCIAL_PDS,
    PMS_FINANCIAL_PDS[Month Start],,,
    Dense
)

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

If you can please share some sample data with expected result, it will be help for test and coding formula.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Experts
See attached sample file.

link: https://www.dropbox.com/s/ne2pk1eehazyvce/Sample__v.1.13.pbix?dl=0

Rank the values with most current date as 1 and oldest date as 36.. see table 2 in attached pbix file for your data.

Hi @Anonymous ,

Sorry for late response, I try to access your link but it seems expired. Can you please renew and share it?
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Xiaoxin Sheng

I have managed to solve the problem using the following DAX and Amend my orginial DAX formula. Much Appericated for all the support you guy provide.

Index = 
RANKX(
    PMS_FINANCIAL_PDS,
    PMS_FINANCIAL_PDS[Month Start],,,
    Dense
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.