Forum Discussion

StephenF's avatar
StephenF
Responsive Resident
4 years ago

Getting RankX to work for two categories

Hi,

My Data looks like the following and I wish to generate a column as per the rightmost value in red based on clustering on two categories, category and client based on their sum spend.

 

 

I require to be able to filter on columns that are hidden here, such as month and channel btw if that helps.

 

Tried this but no beuno.

 

Ranking by Sub Category =
    RANKX (
        FILTER(
            ALL(
                DataLake[MainCategory],
                DataLake[Client]
                ),
            DataLake[MainClashName]= MAX(DataLake[MainCategory])
            ),
            CALCULATE(SUM(DataLake[Spend]))
            )
 
I have had circular reference issues with other implementations of rankx too.
 

 

 

 

 

 

2 Replies