Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I have a base CSV that has a column called 'Usage'. Each time this CSV is generated the number of distinct values in the 'Usage' column will change. Today it is 3, tomorrow it could be 7. I need to build a separate query for each unique value, I can do this manually, only each time I may require more or less queries.
Is there a way to dynamically create 'n' queries in Power Query based on distinct values of a column?
Thanks in advance
John
Solved! Go to Solution.
Thanks Pete, I thought this was the case, the XY probleem seems like it was written just for me :D. I was over-thinking the problem completely.
I've gone with another (much simpler) method, of just adding cond. columns, that can each cater for a wider range of values. Thank you for your reply
Thanks Pete, I thought this was the case, the XY probleem seems like it was written just for me :D. I was over-thinking the problem completely.
I've gone with another (much simpler) method, of just adding cond. columns, that can each cater for a wider range of values. Thank you for your reply
Hi John,
Firstly, no, you can't dynamically spawn new queries in Power Query.
Secondly, this looks like an XY Problem. If you can give more detail around what you're actually trying to achieve overall, I may be able to advise you on a better way to get to your end goal.
Pete
Proud to be a Datanaut!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |