Forum Discussion
330SMG
4 years agoFrequent Visitor
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 ...
- 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.
SpartaBI
Community Champion
4 years agoOk, no worries. It's late here so let's continue tomorrow 🙂
Please go check out my reportt and kudos it if you liked it 🙂
SpartaBI
Community Champion
4 years ago330SMG 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.