Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

atsushi_saijo
Contributor 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?

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Set Expression of 'InMonthToDate'

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.

1 Reply
MVP
MVP

Re: Set Expression of 'InMonthToDate'

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.

Community Browser