Forum Discussion
Rankx with Calculate
There is a few Rankx threads out there but not for my easy situation. I have a DIM Table called 'Location' and a measure called Groups from seperate fact table.
I can rank my facilities no problem with this
4 Replies
- danextian
Super User
Hi Anonymous ,
Assuming this is a calculated column and with just the information avialable, try this. before ranking happens.
= RANKX ( //filter the table before ranking an item FILTER ( FILTER ( 'Location', 'Location'[Facility] = EARLIER ( 'Location'[Facility] ) ), 'Location'[Exclude] = "Y" ), [Groups] )If the facility to be excluded still returns a value, you can add a conditional column so the ranking is null
= IF ( 'Location'[Exclude] = "Y", RANKX ( //filter the table before ranking an item FILTER ( FILTER ( 'Location', 'Location'[Facility] = EARLIER ( 'Location'[Facility] ) ), 'Location'[Exclude] = "Y" ), [Groups] ) )- AnonymousNot applicable
I am doing the Rankx as a measure inside a MAtrix visual. I have another rank measure that does not exclude so thats why i cant just filter them out in th evisual pain either.
- danextian
Super User
Please provide sample data. It is easier for anyone who wants to help with something to work on than just use the imagination.
- Ashish_Mathur
Super User
Hi,
Does this measure work?
= RANKX(FILTER(ALLNOBLANKROW('Location Mapping'[Facility]),'Location'[Exclude]<>"Y"),[GROUPS])