14 Replies Latest reply on Apr 23, 2018 3:30 PM by JT Klepp

    Date field seen as an integer

    JT Klepp

      I have two date values from two sources that I am comparing to get revenue for the current fiscal year (starts 10/1).  I tried the following formula which I know works on a single dataset:


      sum(IIF(MONTH([Date/Time])>=IIF(MONTH(DATE([Month Parameter]))>=10,DATE("10/1/"+str(YEAR([Month Parameter]))),DATE("10/1/"+str(YEAR([Month Parameter])-1))),IIF(MONTH([Date/Time])<=[Month Parameter],[Fees (USD)],NULL),NULL))


      however, Tableaus is throwing an error on the red marks saying that I can't compare integer and date values. However, the [Date/Time] element and [Month Parameter] should both be dates, so I should be comparing two dates.  Any ideas?