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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum and IF

I am using the following as an expression and it is working

Sum({<TERM_CODE_EFF={'2012-13'},REG_STATUS={'RE','RP','RS','WU'},StudyYearCommencementDate={'>01/09/2012''<01/08/2013'},[No Attendance]={'X'}>}Today()-StudyYearCommencementDate)/17

I want to add an IF to the sum statement and have tried a number of different methods but  I am not getting nowhere so any help is appreciated.

My IF statement on its own  is as follows;

If (LEVEL='PGR',Sum(Today()-StudyYearCommencementDate/41),Sum(Today()-StudyYearCommencementDate/17))

 

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Does this do what you need?

Sum({<TERM_CODE_EFF={'2012-13'},REG_STATUS={'RE','RP','RS','WU'},StudyYearCommencementDate={'>01/09/2012''<01/08/2013'},[No Attendance]={'X'}>}Today()-StudyYearCommencementDate)/if(LEVEL='PGR',41,17)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Does this do what you need?

Sum({<TERM_CODE_EFF={'2012-13'},REG_STATUS={'RE','RP','RS','WU'},StudyYearCommencementDate={'>01/09/2012''<01/08/2013'},[No Attendance]={'X'}>}Today()-StudyYearCommencementDate)/if(LEVEL='PGR',41,17)


talk is cheap, supply exceeds demand
Not applicable
Author

Perfectly thank you