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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonalbjr
Contributor
Contributor

Qlikview

I am trying to use If and sum function while uploading data in qlikview .

The expression that I am using is 

If([xyz]= 'abc', sum([pqr]), 'NA')

 

But its showing an error. How to use summation inside if statement in qlikview script?

2 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Probably you want:

Sum(If([xyz]= 'abc', [pqr]))

JG

duchezbr
Contributor III
Contributor III

Because sum is an aggregation function, you may need to use Group By [xyz] in your load script. 

Test:

Load

  [xyz]

  If([xyz]='abc', sum([pqr]))

Resident OriginalTable

Group By [xyz];