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
Hell-1931
Helper II
Helper II

Issues with table valued function parameters, while importing into Power BI Desktop

I have table valued function (from SQL) with two 'date' type parameters (@BOP, @EOP)

@BOP is Beginning of Period

@EOP is End of Period

I need to import this tvf into Power BI. When I do it (I use SQL Server Import), PBI asks me to enter the dates for my @BOP / @EOP.

But I need to be able to use this data set for a different dates, in order not to make these data static.

Is there a way in SQL or in Power BI Desktop to keep my parameters dynamic (and not to use a specific dates when I import this dataset)?

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Hell-1931 ,

 

Try to use M parameters.

Power Query (M) – Passing Parameters dynamically to a SQL Server Query - Reporting/Analytics Made ea...

Solved: How do I pass parameters to my SQL statement? - Microsoft Power BI Community

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi @Hell-1931 ,

 

Try to use M parameters.

Power Query (M) – Passing Parameters dynamically to a SQL Server Query - Reporting/Analytics Made ea...

Solved: How do I pass parameters to my SQL statement? - Microsoft Power BI Community

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

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.