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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

2 Calendar object in one selection

hi all,

in my model i use calendar object to select date range dynamically,

i want to enhance that and compare values between different dates

Date_A and Date_B are originally Date field loaded with alias to use two Calendar object.

all is working well separately but when selecting both, first selection drops off the current selection..

i use below expressions in the table but only one can work at the time..

any ideas?

sum({$<Date_A =>}Amount)

sum({$<Date_B =>}Amount)

2 Calendar object.jpg

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I would ask you to write something like below

Sum({<Date_A = {">=$(Period_A_From) <=$(Period_A_To)"}, Date_B = {">=$(Period_B_From) <= $(Period_B_To)"}>} Amount)

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
Anil_Babu_Samineni

I would ask you to write something like below

Sum({<Date_A = {">=$(Period_A_From) <=$(Period_A_To)"}, Date_B = {">=$(Period_B_From) <= $(Period_B_To)"}>} Amount)

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
ilanbaruch
Specialist
Specialist
Author

hi Anil, thanks for your swift replay.

solved it with below expressions

period a

Sum({$<date_a={"<=$(vEndDate)>=$(vStartDate)"}>}amount)

period b

Sum({$<date_b={"<=$(vRangeEnd)>=$(vRangeStart)"}>}amount)

again thank you

Anil_Babu_Samineni

This make sense and i would ask you to write like below for next KT person

period a

Sum({$<date_a={">=$(vStartDate)<=$(vEndDate)"}>}amount)

period b

Sum({$<date_b={">=$(vRangeStart)<=$(vRangeEnd)"}>}amount)

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