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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bvssudhakar
Creator III
Creator III

How to calculate date difference from one date to 30 days before Todays date

Hello Experts,

Can you help me for this query..:=Sum({<Floor(Today()-30)-Floor([Closed date])>}[No. of CV Submitted])

I wrote this expression for bar chart but it is giving error

My requirement is i want to calculate date difference from closed date to last 30 days for resumes submitted column

Please help me out from this

swuehl stalwar1mbaeyensjagan

Thank you in advance

1 Solution

Accepted Solutions
sunny_talwar

Does 134 looks like the number you would get from the sample file based on the condition you need?

Script

Table:

LOAD RecruiterName,

    Skillname,

    Date(Date#([Closed date], 'DD-MMM-YYYY')) as [Closed date],

    "[No. of CV Submitted]" as [No. of CV Submitted],

    Placed

FROM

[..\..\Downloads\CH09_20180809_171052.xls]

(biff, embedded labels, table is Sheet1$);

Basically, your date was read as a string by Qlik and that is why I used Date#() function to help interpret it as a date field....

and then used this

=Sum({<[Closed date] = {"$(='>=' & Date(Today()-30))"}>} [No. of CV Submitted])

View solution in original post

21 Replies
sunny_talwar

Are you looking for date difference or are you counting/summing the number of cv submitted here? What is the goal?

bvssudhakar
Creator III
Creator III
Author

Hi Sunny

I want to show how many resumes submitted between closed date column to 30 days before today

sunny_talwar

In that case... try this

=Sum({<[Closed date] = {"$(='>=' & Date(Today()-30))"}>} [No. of CV Submitted])

bvssudhakar
Creator III
Creator III
Author

that means i want to sum of resumes submitted between those two dates

Anil_Babu_Samineni

I think, This is what you are stating. Can you check this?

=Sum({<[Closed date] = {">=$(=Date(Max([Closed date])-30))<=Max([Closed date])"}>} [No. of CV Submitted])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bvssudhakar
Creator III
Creator III
Author

It's not giving any data, it is showing no records to display

sunny_talwar

What is the format for Closed date? Is it a date or timestamp field?

bvssudhakar
Creator III
Creator III
Author

Hi Anil,

This is also not showing any result, I want to show the sum of resumes submitted between closed date column to 30 days before today's date

bvssudhakar
Creator III
Creator III
Author

I have taken the data from sql server and i think that column data type is varchar