Forum Discussion

330SMG's avatar
330SMG
Frequent Visitor
4 years ago
Solved

Issue with Rankx measure in Table

Hi I have the following Measure created.   Top5 Customers = CALCULATE([Total Orders], FILTER(VALUES(DimCustomer[FirstName]), IF(RANKX(ALL(DimCustomer[FirstName]),[Total Orders],,DESC)<=5,[Total ...
  • SpartaBI's avatar
    SpartaBI
    4 years ago

    330SMG this is the measure for top 5 first names:

     

     

    Top5 First Names = 
        CALCULATE(
            [Total Orders],
            FILTER(
                VALUES(DimCustomer[FirstName]),
                IF(RANKX(ALL(DimCustomer[FirstName]),[Total Orders],,DESC)<=5,[Total Orders],BLANK())
            )
        )

     

     


    After you created the measure you need to make sure to put the right column in the visual (In this case. [FirstName], in the previous case [CustomerKey]). That is why in both cases I get the right result with the same data you have.

     


    In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.

    Showcase Report – Contoso By SpartaBI


    Visit SpartaBI website   Visit SpartaBI Linkdin   Visit SpartaBI Facebook

    SpartaBI Logo