Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

eduardo_dimperi
Valued Contributor II

Set Analysis Problem

Hi !

I need to do a complex (not complex but extense) set analysis, so i tried something more simple like this:

Sum({$<CONSUMO_TOTAL = {"> CONSUMO_MEDIA_TRIMESTRAL"}>}CONSUMO_TOTAL)

I have Value for CONSUMO_TOTAL and CONSUMO_MEDIA_TRIMESTRAL

set_analysis2.JPG

But my result with set analysis is zero

set_analysis.JPG

why?

PS: The original expression that i want to transform to set analysis is:

SUM(If(CONSUMO_TOTAL>1.5*CONSUMO_MEDIA_TRIMESTRAL and CONSUMO_MEDIA_TRIMESTRAL>1 and CONSUMO_TOTAL>1 OR CONSUMO_TOTAL<0.5*CONSUMO_MEDIA_TRIMESTRAL and CONSUMO_MEDIA_TRIMESTRAL>1 and CONSUMO_TOTAL>1 ,(FABS(CONSUMO_TOTAL- CONSUMO_MEDIA_TRIMESTRAL))))

/

COUNT(If(CONSUMO_TOTAL>1.5*CONSUMO_MEDIA_TRIMESTRAL and CONSUMO_MEDIA_TRIMESTRAL>1 and CONSUMO_TOTAL>1 OR CONSUMO_TOTAL<0.5*CONSUMO_MEDIA_TRIMESTRAL and CONSUMO_MEDIA_TRIMESTRAL>1 and CONSUMO_TOTAL>1 ,(CONSUMO_TOTAL- CONSUMO_MEDIA_TRIMESTRAL)))

2 Replies
vvira1316
Valued Contributor II

Re: Set Analysis Problem

Hi,

Sample data set will be very helpful for someone to help you.

BR,

Vijay

eduardo_dimperi
Valued Contributor II

Re: Set Analysis Problem

Sorry VIJAY, can't give any sample about it.

Well i found a way to do it work

Sum({$<CONSUMO_TOTAL = {"=CONSUMO_TOTAL > CONSUMO_MEDIA_TRIMESTRAL"}>}CONSUMO_TOTAL)


but why is wrong the first example, don't know