Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mwadhwani
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
TomMartens
Super User
Super User

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
TomMartens
Super User
Super User

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
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

Hi @Anonymous,

Thanks for the solution.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.