Forum Discussion

mwadhwani's avatar
mwadhwani
Kudo Kingpin
8 years ago
Solved

Dynamic Column on slicer selection

Hi Experts,

 

I have a 4 columns in my table named Region,Branch1,Branch2,Branch3. Branch1,Branch2,Branch3 contains date.They are opening dates of the branches.I want a grid report and a slicer containing Branch1,branch2,Branch3.In a grid report,if I select Branch1 then branch1 column should be displayed(with opening date) region wise.If I select multiple branches then it should display accordingly in a grid report.

 

I tried using unpivot column but i am not able to get exact solution.

 

Any help or suggestion will be appreciated.Thank You

  • Hey,

     

    what you are looking for is a solution that takes the benefits from an unrelated table. What you need is a table that just contains the branches "Branch 1", "Branch 2", ...

     

    Then you can use table as content for a slicer and also as column header for a matrix visual. What you have to do, is writing a measure that maps the value (Branch 1 with the date value) from your table to the content of the axis coming from the unrelated table.

     

    In this post I describe an approach how to use unrelated tables:

    https://community.powerbi.com/t5/Desktop/How-to-select-only-show-previous-X-months-in-visual/m-p/234617#M104446

     

    If you provide sample data, ideally in form of a pbix file (share the link to this file using onedrive or dropbox), we can provide a solution or guide you further.

     

    Regards 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, it sounds like unpivoting the Branch columns should do the trick but it's hard to understand your exact problem / requirements without an example.

     

    If you could upload a dummy dataset of your situation as a .pbix file then we would be better able to assist.

     

    Kind regards,

     

    Will

    • mwadhwani's avatar
      mwadhwani
      Kudo Kingpin

      Hi Anonymous,

      Thanks for the solution.

      I achieved the solution using unpivoting column and using matrix visual.

  • Hey,

     

    what you are looking for is a solution that takes the benefits from an unrelated table. What you need is a table that just contains the branches "Branch 1", "Branch 2", ...

     

    Then you can use table as content for a slicer and also as column header for a matrix visual. What you have to do, is writing a measure that maps the value (Branch 1 with the date value) from your table to the content of the axis coming from the unrelated table.

     

    In this post I describe an approach how to use unrelated tables:

    https://community.powerbi.com/t5/Desktop/How-to-select-only-show-previous-X-months-in-visual/m-p/234617#M104446

     

    If you provide sample data, ideally in form of a pbix file (share the link to this file using onedrive or dropbox), we can provide a solution or guide you further.

     

    Regards