Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Date

Hi all ,

Can someone tell me how do i use dept date minus actaull date

and Average of this date ?

I have Actaul Date  and Dept Dat , Dept date is always less then Actaul Date ,

And also Average of this date

5 Replies
susovan
Partner - Specialist
Partner - Specialist

Hi John,

Can you share any sample qvw??

after that check this issue...

Warm Regards,
Susovan
Digvijay_Singh

If both the dates are defined as Date type using Date function then you can subtract one from another and you will get no of days, difference between them. You want average of this resulted no? You can use Avg function, please share more details about your sample data, dimensions, expression you have worked out so far to provide more help.

smilingjohn
Specialist
Specialist
Author

Hi Below is the expression Iam using

Here I need to bring the Dept date - Date  (Get) and Avg of (Dept Date - Date) for Bring

Can someone plz let me know how accordingly we can make the changes

pick(match(DLT, 10,20),

//Get

  num(Alt(Count(DISTINCT

  {1<

  Date = {">=$(StartDate)<=$(EndDate)"},

  Phase= P(Phase_S),

         Lead_SubCategory={'Internet','Regional','Special Program','Dealer Sourced','Dealer Entered','Third Party'},

         Lead_Source={'*'}-{'Showroom','Phone','lmn','Dealer Third Party'},

                 [Event]={'Contacted'}       

  >} Lead_UID

  )

  /

  $(Current_Lead_Volume),0)

  ,'#,##0.0%')

  ,

  //Bring

  num(Count(DISTINCT

  {1<

  Date = {">=$(StartDate)<=$(EndDate)"},

  Phase= P(Phase_S),

         Lead_SubCategory={'Internet','Regional','Special Program','Dealer Sourced','Dealer Entered','Third Party'},

         Lead_Source={'*'}-{'Showroom','Phone','lmn','Dealer Third Party'},

                 [Event]={'Appointment Booked'}       

  >} Lead_UID

  )

  /

  $(Current_Lead_Volume),'#,##0.0%')

  ,

smilingjohn
Specialist
Specialist
Author

You mean to say

AVG(Dept Date -Date) will give me the AVG of this dates ?

Digvijay_Singh

If I see your expression, you are trying to use one of the Date field, to filter your fact records from both your expressions, Do you want to add one more criteria here using Dept Date and Date? Can you explain for what purpose dept date is used here and how the subtraction from Date is helping here, it would be easier to correlate with your expression once we know what you want to achieve with these dates.