Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Comaprison of Two Dates

Hi All,

I have a chart showing Value vs Category.

In selection I have a date selection called Delivery Req. Date. And current logic is Qlik will calculate the Max Date and Max Date -30, on the basis of selected Date and show the values on that period.

Existing:

Now user wants to select two Delivery Req. Date and chart will show two bar chart against two date.

Can u please help me to implement that.

Required:

7 Replies
tresesco
MVP
MVP

Hi Sarif, hope you are doing good.

The easiest way would be to include the date field in the dimension of the chart and exclude it's restriction from set analysis section of expression. PFA

mhmmd_srf
Creator II
Creator II
Author

HeyTresesco,

I am doing good. How about u?

Tresesco two things here:

1. User need to different Selection Box for Date.

2. There is a calculation like :

CstDate1 = {'>=$(=$(vMaxDate_30)) <$(=$(vMaxDate))'}

The selected date would participate in this Set Analysis.

Please let me know if you need any other info.

Thanks,

Sarif

Anil_Babu_Samineni

Does this helps?

=Sum({<CstFiscalPeriod,CstFiscalYear,DateSnapshot_Key = {'$(=$(vDateSnapshot))'}, CstDate1 *= {">=$(=$(vMaxDate_30)) <=$(=$(vMaxDate))"}>} LineValue)

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)
mhmmd_srf
Creator II
Creator II
Author

Can you please out this into the attached app and share.

This would be very helpful for me to understand in short time.

Thanks,

Sarif

tresesco
MVP
MVP

You mean that there should be check that selected two dates should be within the given range?

mhmmd_srf
Creator II
Creator II
Author

For two different Date Selection the similar logic would be applied.

Chart would display the value between selected date and (selected date - 30) range.

Sum({Date > Selected Date1 - 30  and Date< Selected Date1} Values)

Sum({Date > Selected Date2 - 30  and Date< Selected Date2} Values)

Please let me know if u need any further details.

Thanks,

Sarif

tresesco
MVP
MVP

Something like this?

Capture.JPG