Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
antoniodneto
Creator II
Creator II

Help with Date Filter - Set Analysis

Hi Guys,

 

I have two date fields (data_base and VCTO_VA_TFC).

My max data_base is 01/07/2019 and I'm trying to get the measure EAD_ATU where VCTO_VA_TFC is between 01/08/2019 - 31/08/2019.

My expression used is SUM({<data_base={"$(=MAX(data_base))"},VCTO_VA_TFC={"$(=ADDMONTHS(MONTHSTART(MAX(data_base)),1)) <=$(=ADDMONTHS(MONTHEND(MAX(data_base)),1))"}>}ead_atu) but is not working.

Can you guys help me?

Tks

 

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

It is the order in which you use the date functions, see the image below.MonthEnd.PNG

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

I think you are missing a ">=" sign:

 

SUM({<data_base={"$(=MAX(data_base))"},VCTO_VA_TFC={">=$(=ADDMONTHS(MONTHSTART(MAX(data_base)),1)) <=$(=ADDMONTHS(MONTHEND(MAX(data_base)),1))"}>}ead_atu) 

antoniodneto
Creator II
Creator II
Author

It worked!! Tks little miss.

One question, when I set MonthEnd for example July/19 returns 07/30/2019 actually July is 31 days.

Why it happens?

jwjackso
Specialist III
Specialist III

It is the order in which you use the date functions, see the image below.MonthEnd.PNG

antoniodneto
Creator II
Creator II
Author

Perfect!!! Thank you so much!!!!