Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nikhil425
Helper I
Helper I

Unable to Pass Date Parameter to DAX Query using Import Mode

Hello there, 

 

I have been trying to figure this out myself, but after so many trials, I felt exhausted and wanted to get your help. I pointed my Power BI Desktop file to Analysis Service Tabular Database and importing data directly using DAX query. 

 

Below screen shot shows the DAX query and the corresponding Mquery on top

Dax query.JPG


This works fine, because I am passing the date directly, however I wanted to pass the date as a parameter instead of hardcoding directly in the DAX query. 

Can you please me how to write the corresponding MQuery, I already created a parameter in Power query. I just wanted to reference that parameter below:
parameter.JPG

Appreciate, if anyone can help me solve this. 

 

Thank you,

Nik

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @nikhil425 

Here are some guide documents:

PASS PARAMETER IN POWER QUERY

https://www.red-gate.com/simple-talk/sql/bi/power-bi-introduction-working-with-parameters-in-power-b...

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-juanli-msft 
I have tried all the variations listed on the website already. For some reason I am getting the following error:

 

Error.JPG

 

And I created there different input parameters (Year, QuarterEnd and Last date), because we always run the report on Quarter Ends. 

 

I am I doing something wrong?

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors