Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
Not applicable

Set Analisys with month condition


Dear all,

I´d like to use set analysis with a month condition for one of the fields, but I´m getting errors doing it.

Could you please seeing the script what I´m doing wrong? (the last sentece is giving me problems)

({<[Fehl.Mng.fremd]={">0"}>}(NAS))and
count({<[Vorlagennummer]={">0"}>}(NAS)) and
count({<[Meldungsart]={"Q2"}>}(NAS))and
count({<Month([Angelegt am])=Month(AddMonths(Today(),-1))>}(NAS))

Thanks and regards.

Asier

Tags (2)
5 Replies
Highlighted
MVP
MVP

Re: Set Analisys with month condition

Problematic area -count({<Month([Angelegt am])=

<this expects a name of a field>

It would be somewhat like:  Count ({<YourMonthField={"$(=Month(AddMonths(Today(),-1)))"}>}

Highlighted
Not applicable

Re: Set Analisys with month condition

Thanks treseco for the quick reply.

Where you write YourMonthField, could it be replace for count({<Month([YourMonthField])=...

I´m no getting any value with the suggested change.

Kind regards.

Asier

Highlighted
MVP
MVP

Re: Set Analisys with month condition

({<[Fehl.Mng.fremd]={">0"}>}(NAS))and
count({<[Vorlagennummer]={">0"}>}(NAS)) and
count({<[Meldungsart]={"Q2"}>}(NAS))and
count({<Month([Angelegt am])=Month(AddMonths(Today(),-1))>}(NAS))


You have provided set analysis but the aggregation function missing...


COUNT/SUM/AVG (YOUR ABOVE EXPRESSION)YourDimesion

Highlighted
Not applicable

Re: Set Analisys with month condition

Yes. Sorry that was a paste mistake.

The error comes from the last sentence.

count({<Month([Angelegt am])=Month(AddMonths(Today(),-1))>}(NAS))

I´ve just changed in the scprit the Field [Angelegt am]) for Month([Angelegt am]) as Monat and now I have this sentence, which is still not working ...

count({$1<[Monat]={"<=$(=Month(AddMonths(Today(),-1)))"}>}NAS)

Any ideas?

Highlighted
MVP
MVP

Re: Set Analisys with month condition

count({$1<[Monat]={"<=$(=Month(AddMonths(Today(),-1)))"}>}NAS)


Looks like your Monat is in different format.... You need to convert the data format to match something like below

What is the Monat format?