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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to control table/matrix date columns with filter?

Hi I have two tables from different data sources that look like this, with values under month columns.

 

walteraussie_0-1620871214112.png

 

Is it possible to set up a date/month filter to control the columns that show on both tables and compare the values from the different sources?

 

Cheers

1 ACCEPTED SOLUTION

I'd advise a bit of remodelling in power query so the data's easier for Power BI to work with.

 

First highlight all the month columns then click Unpivot Columns

PaulOlding_0-1620899559716.png

The data will now look like this:

PaulOlding_1-1620899653928.png

Add a Custom Column to have the source 

PaulOlding_2-1620899874222.png

 

Repeat the same steps for your second table.

Finally, use 'Append Queries' to get a single table with all the data.

 

Now you can use a matrix, or any other visual that makes sense, to visualise the data and have a slicer on Attribute (you'll probably want to rename that column in Power Query) to filter just selected months

PaulOlding_3-1620900324341.png

 

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Sorry buddy i don't get it. I want the date columns in my table to appear and disappear according to a filter. Is that possible?

 

I've  been trying to merge the queries but with no success. While this won't solve my problem it might help.

 

Here's what i'd like the merge to give me:

walteraussie_0-1620897859927.png

It'd join the two tables aligning the matching columns. I known it might make more sense tweaking the raw data.

 

Just wondering if PowerBI can do this.

 

Cheers

I'd advise a bit of remodelling in power query so the data's easier for Power BI to work with.

 

First highlight all the month columns then click Unpivot Columns

PaulOlding_0-1620899559716.png

The data will now look like this:

PaulOlding_1-1620899653928.png

Add a Custom Column to have the source 

PaulOlding_2-1620899874222.png

 

Repeat the same steps for your second table.

Finally, use 'Append Queries' to get a single table with all the data.

 

Now you can use a matrix, or any other visual that makes sense, to visualise the data and have a slicer on Attribute (you'll probably want to rename that column in Power Query) to filter just selected months

PaulOlding_3-1620900324341.png

 

 

Anonymous
Not applicable

All sorted it works perfectly. Thank you.

Anonymous
Not applicable

Thank you Paul what a great solution. I'll just need some more research as the Source columns in both tables are erroring due to a cyclic reference. Not sure why....

 

Also the Source was just named 'Table' in both queries leaving me no way to identify them. Is there a way of renaming them manually?

amitchandak
Super User
Super User

@Anonymous , You need to create a common date table with date, month year , year columns and use date table as column in visual

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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