Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cpasqua87
New Contributor

difference of days

Good day, I am new to using the application and I am putting together a sheet the subject is that I do not know how to show a data I have two columns in date format and what I want to do is count the number of records that have a difference greater than 30 days

What I want to do is to count the amount when the difference between the gang end date and the date is greater than 30 days and put in a text box

Capturaaa.JPG

already appreciate your help thank you

very much Cristian

3 Replies
vamsee
Valued Contributor

Re: difference of days

Hi,

Probably this in the back end.

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ConditionalFun...

and use it as a filter in the chart.

OR


At the most granular level of data

Num(EndDate)-Num(StartDate) as Age

And Age as filter in Chart

SUM({<Age={">30"}>}Amount)

big_dreams
Contributor III

Re: difference of days

Hi,

use interval() to calculate difference of date.

As logic

you can create flag in back end i.e. script using interval()

like if(interval(date2-date1,'D')>30,'more than 30') as date_diff_flag

in front end use count({<date_diff_flag={"more than 30"}>}yourcountField)

Regards,

zebhashmi
Valued Contributor

Re: difference of days

Sum(aggr(if(Date2-Date1 > 30,1,0),YourFieldofCount))