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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bahadur
New Member

Is DAX function allowed in QUERY part of SOURCE?

I am trying to parameterize the source of a query as below:

 

= Sql.Database("myServer", "myDB", [Query="EXEC [myProc] '" & USERNAME() &"'", HierarchicalNavigation=true])

 

So that based on the user logged in (return by DAX function USERNAME) the stored proc will return realted data.

 

Is this conceptually allowed?  If so what is the correct syntax?

 

I have managed to make following work:

 

= Sql.Database(SQLServer, config[parmValue]{1}, [Query="EXEC [myProc];", HierarchicalNavigation=true])

 

where SQLServer is a parameter and config is just a table.

 

Thank you.

 

** [first post so apologize for any breach(es) of etiquette/protocol].

0 REPLIES 0

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.