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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Prash546
Helper I
Helper I

How to get different column data for a slicer from data coming out of two tables

Hello All,

 

I have slicer created by dim time table having "YTD", "QTD", corresponding to this in another table I have a columns 1.Ytd expln, 2.YTD amt,3.YTD absolute 4.QTD expln, 5.QTD amt 6. QTD absolute.

 

Now when I want to create a matrix table adding all this 6 columns, when I click on "YTD" in the slicer I should get only columns 1.Ytd expln, 2.YTD amt,3.YTD absolute and when I click "QTD" in the slicer I should get 4.QTD expln, 5.QTD amt 6. QTD absolute.

 

 

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Prash546 

 

Sounds like a dynamical column based on the slicer, you might refer to below similar threads for more reference:

https://community.powerbi.com/t5/Desktop/Dynamic-Column-Based-on-Slicer-Selection/m-p/81126 

https://community.powerbi.com/t5/Desktop/Column-Selection-in-matrix-table-visualization/m-p/547264#M... https://community.powerbi.com/t5/Desktop/filtering-fields-to-show/m-p/566713#M267403 

 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. If not, please kindly elaborate more (share the dummy pbix with expected results would be much appreciated). thanks!

 

Community Support Team _ Dina Ye
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

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Prash546 

 

Sounds like a dynamical column based on the slicer, you might refer to below similar threads for more reference:

https://community.powerbi.com/t5/Desktop/Dynamic-Column-Based-on-Slicer-Selection/m-p/81126 

https://community.powerbi.com/t5/Desktop/Column-Selection-in-matrix-table-visualization/m-p/547264#M... https://community.powerbi.com/t5/Desktop/filtering-fields-to-show/m-p/566713#M267403 

 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. If not, please kindly elaborate more (share the dummy pbix with expected results would be much appreciated). thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
kentyler
Solution Sage
Solution Sage

It sounds like you need to unpivot your table. So that the column headers 1.Ytd expln, 2.YTD amt,3.YTD absolute 4.QTD expln, 5.QTD amt 6. QTD absolute.  become values in a column.

Then you can write a measure or a calculated column to extract the Ytd or QTD part of each value

Then you can create a relationship between your slicer and that column and when you slice by YTD you will get only the YTD values





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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