Forum Discussion

SNDG's avatar
SNDG
Frequent Visitor
4 years ago

Snowflake query variables not working in Power BI

Hi,

 

I need urgent help in the below scenario.

 

For each month there will be one table in database.  In my report always required latest month data, for that I need to define table name dynamically based on currentdate in snowflake query.

I have created query like below using variable, it is working in snowflake server, but not working in Power query editor.

 

SET V_Mon = (Select 'xxx.DDD_' || Monthname(Current_Date) From Dual)
Select * From table($V_Mon)

 

Can some one help me how to acheive it.

 

Thanks in advance

2 Replies