Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
ilanbaruch
Contributor III

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

Re: 2 Calendar object in one selection

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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

3 Replies

Re: 2 Calendar object in one selection

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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

ilanbaruch
Contributor III

Re: 2 Calendar object in one selection

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

Re: 2 Calendar object in one selection

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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)