• DAX code for Current Year +1

    Author
    Topic
    #1857490

    Hello,

    I’m working in Microsoft Visual Studios in a Tabular Model…  I’m trying to make the follow DAX code be variable, so that it will only pull data from the current year -3.  Below is what works when I hard code it… I’d like to change the 2019 to be NOW or TODAY or CURRENT… but those don’t seem to work.  Any help is appreciated!

    Thank you!

    SELECT [dbo].[DIM Time].* FROM [dbo].[DIM Time] WHERE [Year] = 2019-3

    Viewing 0 reply threads
    Author
    Replies
    • #1858016

      I know nothing of DAX or this coding, but does this reference at all help?

      That is, needing to convert data type between text and numeric?

      Also see here and this.

    Viewing 0 reply threads
    Reply To: DAX code for Current Year +1

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: