Forum Discussion
Issue with Rankx measure in Table
- 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
Ok, no worries. It's late here so let's continue tomorrow 🙂
Please go check out my reportt and kudos it if you liked it 🙂
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