Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Looking back 6 months using a Load Date and Start Date

Hello:

I am having a tough time with a calculation.  I do not have a calendar in my Dashboard, but the data I am using has dates.  I am looking to use a field called 'Load Date' and look to see how many items were created in the past 6 months.  I would be using another field named 'Issue Start Date'. I would need a count of those items that were started within 6 months of the Load Date.  Is this possible?

Thank you for your time.

1 Solution

Accepted Solutions
Not applicable
Author

The Calculation should be :

count(Distinct{$<[Load Date]={">=$(=MonthStart(AddMonths(Today(),-6)))<=$(=MonthEnd(AddMonths(Today())))"}>} [Issue ID])

I had to remove the ( from after Distinct and the ) from the end.

View solution in original post

7 Replies
tchovanec
Creator II
Creator II

Are you looking for items within 6 months prior and 6 months after the load date?

Not applicable
Author

Hi Thomas,

I am only looking for the past 6 months worth of data.  Current to 6 months prior only.

parimikittu
Creator II
Creator II

Hi, Please use the below code and let me know.

"count({}items) "

Not applicable
Author

Hi ,

May be like this

count({$<LoadDate={">=$(=MonthStart(AddMonths(Today(),-6)))<=$(=MonthEnd(AddMonths(Today())))"}>} Items)
Not applicable
Author

Hi Partha:

Thank you for your response.  Is it possible to get a distinct count using this formula?  I have duplicates in the source data.  My formula is as follows:

count(Distinct({$<[Load Date]={">=$(=MonthStart(AddMonths(Today(),-6)))<=$(=MonthEnd(AddMonths(Today())))"}>} [Issue ID]))

The formula without the Distinct works well.

Not applicable
Author

I have tried the following formula and it doesn't work.

count(Distinct({$<[Load Date]={">=$(=MonthStart(AddMonths(Today(),-6)))<=$(=MonthEnd(AddMonths(Today())))"}>} [Issue ID]))

Any help would be greatly appreciated!

Thank you

Not applicable
Author

The Calculation should be :

count(Distinct{$<[Load Date]={">=$(=MonthStart(AddMonths(Today(),-6)))<=$(=MonthEnd(AddMonths(Today())))"}>} [Issue ID])

I had to remove the ( from after Distinct and the ) from the end.