Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
atsushi_saijo
Creator II
Creator II

Set Expression of 'InMonthToDate'

Dear Gurus,

I have used InMonToDate in current project, not least it allows Financial Year and standard Calendar Year easily switched by having start month. But if I needed to achieve this in set expression, how could I write it?

  • [Expression]

  • [in Set Analyses]

Date =

     {"

          >=$(=MonthStart(Today(0),$(=-X)))

          >=$(=MonthEnd(Today(0),$(=-X)))

     "}

Above is one thought to achieve InMonthToDate, but is there something like:

$(=InMonthToDate(....)) ?

I'd apprecaite for any feedback in advance.

[Additional Question 2.] is it the case, that I cannot write set analyses in multiple lines, but always need making it being single line?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

InMonthToDate() returns true/false, hence you can't directly write like: Date={">$(=InMonthToDate())"}. May be you can try like: Date={">$(=If(InMonthToDate(), Date))"},,,, that is compare the date field.

To answer your second questtion: No, it's not necessarily so.

View solution in original post

1 Reply
tresesco
MVP
MVP

InMonthToDate() returns true/false, hence you can't directly write like: Date={">$(=InMonthToDate())"}. May be you can try like: Date={">$(=If(InMonthToDate(), Date))"},,,, that is compare the date field.

To answer your second questtion: No, it's not necessarily so.