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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
alvinford
Contributor III
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
Clever_Anjos
Employee
Employee

I´ve never seen such use of Only.

Why do you need this nested aggregation?

javier_florian
Creator III
Creator III

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