Forum Discussion
Create a Demo Date and Time based on Today() and DateTime.LocalNow()
sulleyinoz ,To achieve this in Power BI, you can use What-If Parameters to create dynamic date and time variables that you can reference in your measures. This approach allows you to set a demonstration date and time, which can be easily adjusted for live deployments.
I'm trying to replace a variable date (i.e. LocalNow() or Today()) with a fixed date in a variable I can then use in my formulae / measures.
I've had a look at the Parameter for modelling ... but not sure how that would work for what I'm trying to achieve ... it doesn't make sense since I can't set up dates or formula in the parameter? Maybe I'm missing something ... but the two options Numeric Range and Fields don't apply. I want the parameter to be a replacement for a DATE not a number, and its not a field I'm replacing but a formula operator .. i.e. Today() or LocalNow().
Have you got an example of exactly how to do this step by step to clarify?
Thanks