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
ShreyasSB12
Frequent Visitor

Dynamically choose other Table columns based on slicer selection

Hi Team,

 

I have two different tables for 2 different months with same column headers in it as below :

 

Table1_Jan :

Month   Details

Jan        Test1

Jan        Test2

 

 

Table2_Feb

Month   Details

Feb        Test3

Feb        Test4

 

I have some Bar charts which dispay the Details and have a slicers to select a month.

Based on the user Selection i need to fetch the Colum : Details value to my Bar chart on below 2 conditions :

     If Jan is selected in slicer we need to fetch Details from Table1_Jan table.

     If Feb is selected in slicer we need to fetch Details from Table2_Feb Table.

Any inputs how i can approach or any link would be appreciated.

 

 

Thanks

Shreyu

1 ACCEPTED SOLUTION

Hi @ShreyasSB12 ,

 

If your tables each month have the same structure, I think you can try to append your tables as a new one in Power Query Editor. Power BI support us to append multiple tables at the same time.

For reference:

Append queries

Then you can create a dimdate table and create a relationship between it with your new append table.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ShreyasSB12 , One option is to bookmark

 

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks

 

For another option, you need a common Month table and then switch measures based on value

 

if(selectedvalue(Month[Month]) ="Jan", Count(Table1[Month]), Count(Table2[Month]))

 

 

Hi,

 

Thanks for the reply.

Bookmark will work  if we have only 2 or 3 options to be selected.

In my case it will 12 different tables Jan to Dec and based on user selection the visuals should get the values form the respective Table_Month(Jan-Dec).

 

Thanks

Shreya

Hi @ShreyasSB12 ,

 

If your tables each month have the same structure, I think you can try to append your tables as a new one in Power Query Editor. Power BI support us to append multiple tables at the same time.

For reference:

Append queries

Then you can create a dimdate table and create a relationship between it with your new append table.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.