SSAS 2016 Tabular / FILTER not working in the calculated table

  • adam9870

    SSC Veteran

    Points: 210

    Hello,

    I reading "Tabular Modeling with SQL Server 2016 Analysis Services Cookbook".

    My environment is: SQL Server 2016 SP2 and Visual Studio 2017 (15.9.12).

    When I paste following code in the function box, Visual Studio is nothing do. I have blank page. Why?

    FILTER(MasterCalendar_T,MasterCalendar_T[Date]>=DATEADD(MasterCalendar_T[Date],6,YEAR))

    According to book, I should see some data.

    As Attachments, I saved screen from book and from my environment.

    • This topic was modified 11 months, 4 weeks ago by  adam9870.
    Attachments:
    You must be logged in to view attached files.
  • Site Owners

    SSC Guru

    Points: 80376

    Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • PB_BI

    SSCoach

    Points: 17092

    Looks like a typo to me. According to the text of the book it should show the last 5 years so the calculation should be:

    FILTER(MasterCalendar_T,MasterCalendar_T[Date]>=DATEADD(MasterCalendar_T[Date],-6,YEAR))

    Note, negative 6.


    I'm on LinkedIn

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply