News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • DAX code for Current Year +1

    Home Forums Developers, developers, developers DAX code for Current Year +1

    This topic contains 1 reply, has 2 voices, and was last updated by  PaulK 2 months, 3 weeks ago.

    • Author
      Posts
    • #1857490 Reply

      LJM
      AskWoody Lounger

      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

    • #1858016 Reply

      PaulK
      AskWoody Lounger

      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.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: DAX code for Current Year +1

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