Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I'm fairly new to PowerBI and have slowly been experimenting with different functions but I've sort of hit a dead end with this. I have a master excel file that is populated with data month on month and has close to 2 years of data now. I want to load this master table to Power BI and then split it into 2 tables based on the year column. I've tried passing a parameter as a filter but that only filters the master table.
I tried creating a table by writing a DAX expression. That worked if I type the actual year in the filter function but it stopped working when I tried to pass a parameter into the filter function. If this was in SQL I could simply use the where statement to get this done. I imagine the solution is similarly easy for this one and I'm just missing something glaringly obvious.
I've attached a screenshot of a mock data set in-case my explanation wasn't clear enough.
Thanks!
Solved! Go to Solution.
Hi @murt112,
In Query Editor of Power BI Desktop, right click master query and then choose “Duplicate” as shown in the following screenshot.
Filter year to 2015 in the first duplicated query and filter year to 2016 in the second duplicated query.
And you can also rename the first duplicated query to 2015 and another to 2016.
Thanks,
Lydia Zhang
Even simpler: Use the query "Reference" feature.
In the query panel on the left, right-click on your original import from Excel and clear the check box for "Enable Load", then right-click on it again and select "Reference". This will create a new query that references the first. Apply your year filter to the new query, rename the query and repeat as needed.
Warm regards,
Clayton
Jut what I was looking for... You are a savior!
Hi @murt112,
In Query Editor of Power BI Desktop, right click master query and then choose “Duplicate” as shown in the following screenshot.
Filter year to 2015 in the first duplicated query and filter year to 2016 in the second duplicated query.
And you can also rename the first duplicated query to 2015 and another to 2016.
Thanks,
Lydia Zhang
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |