Forum Discussion

MichaelaMul's avatar
MichaelaMul
Helper III
1 year ago

Rankx with Filter

Hi,

I am trying to make a rank card visual to show how the product chosen from the slicer ranks within its designated category. I want the category filter to automatically change once the product filter is changed. Would a switch function work?

 

This is the current measure I have:

$/S/S/W Rank = 
IF
(
HASONEVALUE
('UPCData'[Product]) && NOT(ISBLANK(ALLSELECTED(UPCData[Category]))),
RANKX
(
ALL(
'UPCData'[Product]),
CALCULATE
(
[UPC Avg Weekly Dollars per Store Selling divided by Avg Weekly Items per Store Selling])),
"--"
)

Thanks!

1 Reply