3 Replies Latest reply on Oct 20, 2015 6:27 AM by Thomas McCullough

    Calculated filter fails on date

    Mark Simms

      I have a column as a dimension called [DATEKEY] with values of 2015101903, etc.

      In SQL Server it's a BIGINT.

       

      This filter formula results in no data despite the fact there are many rows that qualify.

       

      INT(MID(CHAR([DATEKEY]),1,4))=DATEPART('year',TODAY()) AND

      INT(MID(CHAR([DATEKEY]),5,2))=DATEPART('month',TODAY())

       

      So I want to Sum all measures where the above condition is true (The year and month match the current date).

      I wonder if CHAR is failing to convert that bigint......