# App Development

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results 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)))

Thanks

Charleo

19 Replies
MVP

May be this

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

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

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

MVP

Would you be able to share a sample?

Champion II

what is the definition for vJCEKPI1

Champion II

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
Author

Hey Vineeth,

Its not working dude.

Thanks

charleo

Not applicable
Author

'C' is the defination

regards

Charleo