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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
DavidHodgson
Contributor
Contributor

New to get a date difference in months between 2 dates that exist in 2 different tables

Hi,

I have 2 dates in my data script I need to get the difference in months between, however the dates i need are in 2 different tables with no link (they link through a third table)

so 

Table A

Date 1

 

Table B

Date 2

 

Table C

holds join between A & B

 

I need if possible to script this so in my sheet i use for this I can then drill down on the number of months difference.

I have done a calculation in the sheet which gets me nearly there but for some reason when I drill on the number it does not filter and all the values still show so if I had

 

1,2,5,19 and selected 19 I still am getting 1,2,5,19 showing.

Apologies if this is not clear as first time poster 😀

 

Any help would be appreciated

1 Reply
marcus_sommer

You could try it in the UI with a calculated dimension like:

aggr((year(Date1)*12+month(Date1))-(year(Date2)*12+month(Date2)), YourKeys)

- Marcus