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 PBI Community,
I was looking for a way to be able to feed a table to Power Query and dynamically run the same query using paramters, sort of like this article https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters
But my need is that for the sample table below, I want each individual row to be ran in its own query. For example, lets say the query for my sales db table is :
select * from A.sales
where sku is in ('XXX')
and sales_date between '2024-01-01' and '2024-01-02'
With the table below I want to only pull sales for sku 7002861 between Jan 1 and Jan 7, sku 7022746 between Dec 25 and Dec 31, and so on. Then have these sales results concatenated into one total sales query. Is it possible to do this using the dynamic query example above? I want to avoid pulling all sales and then using a measure to filter because in reality I would have hundreds of millions of rows to pull each year and only want to pull the actual sales info I need. If anyone is familiar with Alteryx, this is accomplished using the dynamic input tool to edit the query with each input. Thanks!
Solved! Go to Solution.
@alaynanich , Dynamic M Parameter is for Direct query mode.
You can have measure like , once you have both tables in power bi
Sumx(SKU, sumx(filter(Sales, Sales[SKU] = SKU[SKU] && Sales[Date] >= SKU[Start] && Sales[date]<= SKU[ENd]) , Sales[Value]))
@alaynanich , Dynamic M Parameter is for Direct query mode.
You can have measure like , once you have both tables in power bi
Sumx(SKU, sumx(filter(Sales, Sales[SKU] = SKU[SKU] && Sales[Date] >= SKU[Start] && Sales[date]<= SKU[ENd]) , Sales[Value]))
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 |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |