Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

convert if in to setanalysis

Hi All ,

Help me convert the below if statement in to setanalysis.

sum(if(vJCEKPI1='A' and Date>=DateCurrPeriodStart and DorC='C',DCAmount,

if(vJCEKPI1='C' and Date>=DateCurrPeriodStart and DorC='C',DCCount)))

Help Is Appriceated please....   

Thanks

Charleo

19 Replies

Re: convert if in to setanalysis

May be this

Sum({<vJCEKPI1 = {'A'}, Date = {"$(='>=' & DateCurrPeriodStart)"}, DorC = {'C'}>} DCAmount) +

Sum({<vJCEKPI1 = {'C'}, Date = {"$(='>=' & DateCurrPeriodStart)"}, DorC = {'C'}>} DCCount)

tajmohamed30
Contributor III

Re: convert if in to setanalysis

=Sum({$<vJCEKPI1={'A'},Date={">=DateCurrPeriodStart"},DorC={'C'}>}DCAmount)+

Sum({$<vJCEKPI1={'C'},Date={">=DateCurrPeriodStart"},DorC={'C'}>}DCCount)


hope it helps

Not applicable

Re: convert if in to setanalysis

Its not working dude...there is a variable to select 'A','C', its not reflecting sunny

Thanks

Charleo

Not applicable

Re: convert if in to setanalysis

Its not working dude,

Thanks

Charleo

Re: convert if in to setanalysis

Would you be able to share a sample?

vinieme12
Esteemed Contributor II

Re: convert if in to setanalysis

what is the definition for vJCEKPI1

vinieme12
Esteemed Contributor II

Re: convert if in to setanalysis

May be you only need $ expansion for variables

Sum({<$(vJCEKPI1) = {'A'}, Date = {"$(='>=' & DateCurrPeriodStart)"}, DorC = {'C'}>} DCAmount) +

Sum({<$(vJCEKPI1) = {'C'}, Date = {"$(='>=' & DateCurrPeriodStart)"}, DorC = {'C'}>} DCCount)

Not applicable

Re: convert if in to setanalysis

Hey Vineeth,

Its not working dude.

Thanks

charleo

Not applicable

Re: convert if in to setanalysis

'C' is the defination

regards

Charleo

Community Browser