Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using If else Condition with Set Analysis

I am trying to get rolling 13 months data in a combo chart while using an if condition to meet the requirement.

I have a list box for Year with "Always one selected value". I am trying to get the requried details irrespective of the list box selection, however when i use the below condition it is showing the month from the selected year to current month.

The below expression works fine for me where i do not require rolling months data; for which i am excluding Year= from expression.

=if(GetSelectedCount(<field_name>)=0,sum({<Year=,REP_MONTH={">=$(VR13)<=$(VCurr)"},REP_LVL={'CO'},KP=,PC=>}Amount,Sum({<Year=,REP_MONTH={">=$(VR13)<=$(VCurr)"},REP_LVL={'PO'},KP=,PC=>})

2 Replies
swuehl
MVP
MVP

REP_MONTH is a field containing a date, like Month start?

And what is the definition of your variables $(VR13) and $(VCurr)?

It's really, really hard to help you with your specific question with the information provided.

Either detail your request with a description of your data model etc, or even better, upload a small sample application that demonstrates your issue.

For now, I am just guessing that variable $(VR13) and or $(vCurr) is in fact depending on your selected year.

Not applicable
Author

Hi,

REP_MONTH is year month something like 201405.

VR13 is current month minus 13 months and VCurr is current month. For example the data from 201305 to 201405.

Regards,