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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar
MVP
MVP

May be this

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

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

tajmohamed30
Creator III
Creator III

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

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


hope it helps

Not applicable
Author

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

Thanks

Charleo

Not applicable
Author

Its not working dude,

Thanks

Charleo

sunny_talwar
MVP
MVP

Would you be able to share a sample?

vinieme12
Champion III
Champion III

what is the definition for vJCEKPI1

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

May be you only need $ expansion for variables

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

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hey Vineeth,

Its not working dude.

Thanks

charleo

Not applicable
Author

'C' is the defination

regards

Charleo