Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

SET ANALYSIS ISSUE

Max Year works for this Expression

(Sum({<CloseAdmin_Year={$(=Max(Year))},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=Max(Year))}>} NET_INDEMNITY_PAID)+

Sum({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=Max(CloseAdmin_Year)'},Month = {

"<=$(=Max(Month))"}>} NET_INDEMNITY_PAID))
/(
Count({<CloseAdmin_Year={$(=Max(Year))},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=Max(Year))}>} distinct

[Claim No])+

Count({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=Max(CloseAdmin_Year)'},Month = {"<=$(=Max(Month))"}>} DISTINCT [Occurence No]))

 

But not working for MAx(Year)-1,

=(Sum({<CloseAdmin_Year={$(=Max(Year)-1)},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=Max(Year)-1)}>} NET_INDEMNITY_PAID)+

Sum({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=Max((CloseAdmin_Year)-1)'},Month = {

"<=$(=Max(Month))"}>} NET_INDEMNITY_PAID))
/
(
Count({<CloseAdmin_Year={$(=Max(Year)-1)},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=Max(Year)-1)}>} distinct [Claim No])+

Count({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=Max((CloseAdmin_Year)-1)'},Month = {"<=$(=Max(Month))"}>} DISTINCT [Occurence No]))

Any Clues

7 Replies
fernando_tonial
Valued Contributor

Re: SET ANALYSIS ISSUE

Add a more brackets.

See underscore.

=(Sum({<CloseAdmin_Year={$(=(Max(Year)-1))},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=(Max(Year)-1))}>} NET_INDEMNITY_PAID)+

Sum({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=(Max((CloseAdmin_Year)-1))'},Month = {

"<=$(=Max(Month))"}>} NET_INDEMNITY_PAID))
/
(
Count({<CloseAdmin_Year={$(=(Max(Year)-1))},NET_INDEMNITY_PAID={"<1000000>0"},Occurence_Number_Flag={'0'},Year={$(=(Max(Year)-1))}>} distinct [Claim No])+

Count({<[Occurence No]={'=sum(NET_INDEMNITY_PAID)>0 and sum(NET_INDEMNITY_PAID)<1000000 and Year=(Max((CloseAdmin_Year)-1))'},Month = {"<=$(=Max(Month))"}>} DISTINCT [Occurence No]))


Best Regards.

Tonial.

Not applicable

Re: SET ANALYSIS ISSUE

Doesnt Work, any more ideas pls

Re: SET ANALYSIS ISSUE

Have you tried      Max(Year -1)

Not applicable

Re: SET ANALYSIS ISSUE

Yes I did

santharubban
Contributor II

Re: SET ANALYSIS ISSUE

can u try this add '$(=(Max(Year)-1))'

Sum({<CloseAdmin_Year={'$(=(Max(Year)-1))'},

Re: SET ANALYSIS ISSUE

If Year is a dimension on your chart, it's not going to work.

Not applicable

Re: SET ANALYSIS ISSUE

No Dimenion is the Month