Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

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
Creator III
Creator III

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

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