Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

alvinford
New Contributor III

Set Analysis Logic

Hi All,

I am using the following expression. The results are correct.

Sum($(=Only(AreaThisYear)))

I want to add some conditions and add it to the set analysis expression as below but not getting the desired results.

=if($(vTodaysYear)=Right(vSelectStartDate,4) AND $(vTodaysYear)=Right(vSelectEndDate,4) ,

sum({<AreaMonthYear = {">=$(vSelectStartDateMY)<=$(vSelectEndDateMY)"},Year={'$(vTodaysFYear)'}>}$(=Only(AreaThisYear))))

Kindly suggest the solution. Can we use Sum along with only in the set analysis.

Regards,

Alvin

2 Replies
Employee
Employee

Re: Set Analysis Logic

I´ve never seen such use of Only.

Why do you need this nested aggregation?

javier_florian
Contributor III

Re: Set Analysis Logic

Hi AlvinFord,

I work with modification data in set expression, for instance:

Count(

{<Year_Month={">=$(=Num(If(Num(Right(Max(Year_Month),2))=2,(Max(Year)-1)&'12',If(Num(Right(Max(Year_Month),2))=1,(Max(Year)-1)&'11',(Max(Year_Month))-2))))<=$(=Num(Max(Year_Month)))"},Día={"<=$(=If(Day(Max(Fecha))>=25,31,Day(Max(Fecha))))"}>}

Distinct Emisiones.Certificado)

Tell us if this work for you.

-JFlorian

Community Browser