Forum Discussion

latifshaikh145's avatar
latifshaikh145
Regular Visitor
1 year ago
Solved

Rank is not working in multiple dimension filter

I have created below paramater for multi dimensions , Dim Selector = {     ("Supplier", NAMEOF('Transactions'[Suplier Name]), 0),     ("Hotel", NAMEOF('Transactions'[Hotel Name]), 1),     ("Ag...
  • danextian's avatar
    danextian
    1 year ago

    And you seem to have created a calculated as 'Dim Selector'[Dimension Selector] isn't aggregated. Calculated columns, unfortunately, do no respond to slicer selections. They are not aware of what's been selected in a slicer.

     

    Instead, create a measure that references the parameter order field otherwise you'll get an error similar to below:

    "Parameter columns is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression".

     

    Column switching rank = 
    SWITCH (
        SELECTEDVALUE ( DimSelector[DimSelector Order] ),
        0, [Rank by Supplier],
        1, [Rank by Hotel],
        2, [Rank by Agency]   
    )
    

    Use the correct measure for each parameter order field value. Use the parameter field and  the measure  above in your visual.

     

     

    Please see attached sample pbix

    Note: Ignore the other pages.