4 Replies Latest reply on Sep 5, 2018 6:33 PM by Okechukwu Ossai

    DAX Formula to Tableau

    julian.ramirez.0

      Hi all, I'm wondering if is possible to pass this formula:

      Fired =

      VAR currDate =     MAX ('Table1'[Date])

      VAR currList =     CALCULATETABLE (         VALUES ( 'Table1'[EmployeeID] ),         FILTER (             ALLSELECTED ( 'Table1' ),             [Date] >= DATE ( YEAR ( currDate ), MONTH ( currDate ), 1 )                 && [Date]                     <= DATE ( YEAR ( currDate ), MONTH ( currDate ) + 1, 1 )                         - 1         )     )

      VAR prevList =     CALCULATETABLE (         VALUES ( 'Table1'[EmployeeID] ),         FILTER (             ALLSELECTED ( 'Table1' ),             [Date]                 >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 1, 1 )                 && [FechaPago]                     <= DATE ( YEAR ( currDate ), MONTH ( currDate ), 1 ) - 1         )     )

      RETURN     COUNTROWS ( EXCEPT ( prevList, currList ) )         + IF ( DISTINCTCOUNT ( 'Table1'[EmployeeID] ) <> 0, 0, BLANK () )

       

      I've been trying to do this in Tableau but it appears that is not possible or I don't know how to.

      Any help is appreciated.

      Regards,

      Julián.