Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rkota
Contributor III
Contributor III

need help please - multiple conditions in Sum(If...)

Hello - Having issues with this statement....obviously doing something wrong....would greatly greatly appreciate any pointers to fix this/get it working

SUM(If(<PoolName='COCP' and Month=Date(Today(),'MMM')> [24Hrs WO]))

so essentially i'm trying to get a SUM only if both conditions are satisfied beore the [24Hrs WO]

Thx

1 Solution

Accepted Solutions
sunny_talwar

May be try using set analysis here:

Sum({<PoolName = {'COCP'}, Month = {"$(=Month(Today()))"}>} [24Hrs WO])

View solution in original post

9 Replies
sunny_talwar

May be try using set analysis here:

Sum({<PoolName = {'COCP'}, Month = {"$(=Month(Today()))"}>} [24Hrs WO])

Rkota
Contributor III
Contributor III
Author

Sunny T(he) man.......Worked!!!.  Thanks a lot..Appreciate your help...

sunny_talwar

Awesome!!! Please close this thread by marking correct response if you got what you were looking for

Qlik Community Tip: Marking Replies as Correct or Helpful

rupamjyotidas
Specialist
Specialist

Please close the discussion

Rkota
Contributor III
Contributor III
Author

need help again....must be something simple that I'm gravely missing

Sum({<PoolName = {'COCP'}, Month=Date((AddMonths(Today(),-1)),'MMMM')>} [24Hrs WO])

This does not return anything...all i'm trying to do is retrieve data from he previous month...

Thanks for any help/assistance

rupamjyotidas
Specialist
Specialist

Try This

Sum({<PoolName = {'COCP'}, Month = {"$(=Month(AddMonths(Today(),-1)))"}>} [24Hrs WO])

Do check on the date format

swuehl
MVP
MVP

Please have a look at

A Primer on Set Analysis

Dates in Set Analysis

and also the relevant HELP pages.

If your month values have been created using Month() function, try

Sum({<PoolName = {'COCP'}, Month={'$(=Month(AddMonths(Today(),-1)))'} >} [24Hrs WO])

Rkota
Contributor III
Contributor III
Author

thanks Rupam....worked.  I realized my mistake..tried to convert the month to a string...and in the process set it to NULL/Blanks/Nada..

Thanks and appreciate the quick response....

Rkota
Contributor III
Contributor III
Author

thanks Stefan....worked as well. Thanks for the links to set analysis

Thanks and appreciate the quick response....

Gobble Gobble - if that's on the agenda this week