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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Dynamc Dax Through MQuery ?

Hey there, I have a question regarding DAX and MQuery use within Power BI and was hoping someone else out there might have done this before or have an article that might lead me in the right direction.

 

Ive used Chris Webb's blogs previously to figure out how in Power BI to make some of my SQL queries completely dynamic using parameters and MQuery through the advanced editor, works wonderfully. However, now what I have is a report where I pull a table from SQL which has a customer id in it. I then get a distinct list of those customer ids into a list query parameter.  I am trying to pass a query to an Analysis Server instance and pull sales information for just those customers within the list query parameter, that means putting the values from that list query into my DAX query and making it comma separated value and using DAX IN statement.

 

My thought was since I can control the sequence that the refresh happens in, I could make sure my DAX refresh happens last, therefore I would always get a dynamic list of sales information for whatever customers come in from my sql source.

 

At present, I have not been able to get the DAX query portion to utilize the query parameter values in a comma seperated way.

 

Any direction on this effort from you would be vastly appreciated.

Thank you.

 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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