Forum Discussion

gladies123's avatar
gladies123
Helper I
4 years ago
Solved

How to update a tablename based on maximum date dynamically on refresh

Hi team,

Is it possible to update table name dynamically based on previous date? kindly share me the inputs to implement this

For Example if report refreshed on the next day,the tablename should be updated as 'VW_DAILY_FT_29JUN2021"

thanks in advance

gladis

 

 

 

  • Hi gladies123 ,
    yes, you can create a step or query  that creates a string from todays date dynamically like so:

     

    Date.ToText(Date.From(DateTime.LocalNow()), "ddMMMyyyy")


    If you named that step or query "myDynamicDate", you would then incorporate that in your query string like so:

    "select * from " & myDynamicDate

     




2 Replies

  • ImkeF's avatar
    ImkeF
    Community Champion

    Hi gladies123 ,
    yes, you can create a step or query  that creates a string from todays date dynamically like so:

     

    Date.ToText(Date.From(DateTime.LocalNow()), "ddMMMyyyy")


    If you named that step or query "myDynamicDate", you would then incorporate that in your query string like so:

    "select * from " & myDynamicDate