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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
BrunoZaghetti
Contributor II
Contributor II

How to make a filter between YearStart and Date

Hello, I'm trying to do a filter in SetAnalysis but it's not working. I need to Sum the field [SPF.QTD_TRANS] only if the field [SPF.DATAREF] is greater than 01/01/2019. My code is:

 

SUM({$<[SPF.DATAREF]={">=$(YEARSTART(MAX(ALL [SPF.DATAREF])))"}>} [SPF.QTD_TRANS])

 

What am I doing wrong? I'm trying for a long time...

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this?

SUM({$<[SPF.DATAREF]={">=$(=YearStart(Today()))"}>} [SPF.QTD_TRANS])

Or

SUM({$<[SPF.DATAREF]={">=01/01/2019"}>} [SPF.QTD_TRANS])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
BrunoZaghetti
Contributor II
Contributor II
Author

I tried also

SUM(
IF(MAKEDATE([SPF.DATAREF],'DD/MM/YYYY')>=MAKEDATE(YEARSTART(MAX(ALL [SPF.DATAREF])),'DD/MM/YYYY'),1,0
)

 

but still not working

Anil_Babu_Samineni

Perhaps this?

SUM({$<[SPF.DATAREF]={">=$(=YearStart(Today()))"}>} [SPF.QTD_TRANS])

Or

SUM({$<[SPF.DATAREF]={">=01/01/2019"}>} [SPF.QTD_TRANS])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
BrunoZaghetti
Contributor II
Contributor II
Author

Thanks , the 1st one solved the problem!