cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Dynamic Column on slicer selection

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/234...

 

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 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
Highlighted
Resolver II
Resolver II

Re: Dynamic Column on slicer selection

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

Highlighted
Super User III
Super User III

Re: Dynamic Column on slicer selection

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/234...

 

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 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Dynamic Column on slicer selection

Hi @giblet17,

Thanks for the solution.

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors