Forum Discussion
How to control table/matrix date columns with filter?
- 5 years ago
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
The data will now look like this:
Add a Custom Column to have the source
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
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:
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
- PaulOlding5 years ago
Solution Sage
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
The data will now look like this:
Add a Custom Column to have the source
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
- Anonymous5 years agoNot 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?
- Anonymous5 years agoNot applicable
All sorted it works perfectly. Thank you.