Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filter slicer using another filter

Hello  I am trying to implement a logic to use a slicer to apply a filter on another slider. For the sake of simplicity I will put a simple version of my use case.    I have a table with a value f...
  • lbendlin's avatar
    2 years ago

    Let your data model do the work for you.  Have a table with all blocks and wire it in. Then feed your slicer from that table.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Thanks for the reply from lbendlin .

     

    Create a disconnected table that should have one column, let is call it NewDim2, with three rows: Block1, Block2, and Block3.

     

    Creates a measure that calculates the total value of each block based on the selection.

    BlockValue=
    VAR SelectedBlock = SELECTEDVALUE( 'NewDim2'[Block] )
    RETURN
         SWITCH(
             SelectedBlock,
             "Block1", [A] + [B],
             "Block2", [A] + [B] + [C] + [D],
             "Block3", [A] + [B] + [C] + [D] + [E],
             BLANK()
         )

     

    Place the Block column in the Slicer and the BlockValue in the card visual object. The final page effect is as follows:


     

    pbix file is attached.

     

    If you have any further questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!