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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

sum({<Year={$(=Max(Year)-1)},MonthNo={"<=$(=Max({<Year={$(=Max(Year))}>}MonthNo))"}>}IF(ISNULL(GI_Weight)=-1,0,GI_Weight))

I am using this expresion to get previous year figure.

Bt it is taken max(MonthNo) which is 8 for all company.

Max(MonthNo) is different for different comapny in current yr.

Comapany20112010max(MonthNo)-2010
AMayDecAug
BFebDecAug
CJunDecAug
DAugJanAug
EAugFebAug
FAprMarAug
GMarAprAug

Figure are showing upto Aug from Jan. Bt i want to show comapny wise max(MonthNo).

How can i do this.

4 Replies
rohit214
Creator III
Creator III

hi

try this

sum({<Year={$(=Max(Year)-1)},MonthNo={"<=$(=Max(}MonthNo))"}>}IF(ISNULL(GI_Weight)=-1,0,GI_Weight))

may it helps you

thanks

rohit

lironbaram
Partner - Master III
Partner - Master III

hei

you need to replace your set analysis part of the month to if statment

you need to understand that set analysis is making the selection outside the chart that means

it look on all companies when calculating the max MonthNo

Not applicable
Author

This not working.......

pls give me a sugestion.

Not applicable
Author

I am attaching one qvw file and one excell file.

It will help to understand my problem.

Please give me a solution.

Thanks in advamce.