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