Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Min Date for specific customer field

I'm trying to create a variable that calculates the first job creation date and job posting date (%Date) for a specific customer.

Below picture shows the equation working on a straight table.  but when i create the variable vFirstOrderDate = min(%Date) I get the first date in my calendar. 

Is there a simple solution?

dates.jpg

4 Replies
sunny_talwar

Not sure what the concern is? Can you elaborate a little more?

Anonymous
Not applicable
Author

I need to create a variable/equation that can pull the first date a customer had a posting.  I will use that to count how many first time customer postings there are per week/year/month. 

petter
Partner - Champion III
Partner - Champion III

It is probably a matter of when the variable is being evaluated. If you define the variable vFirstOrderDate with no equal sign it will be defined as a string that later can be evaluated with a $-sign expansion in the straight table. If it has an equal sign it will not look like a string but as an expression and it will be evaluated immediately. That means that it will not have any dimensions that qualify it and will pick the first date in your calendar.

In the load script the variable can be created like this:

LET vFirstOrderDate = 'Min(%Date)' ;

And be included as an expression like this:

     $(vFirstOrderDate)

Anonymous
Not applicable
Author

This works great for the straight table.  but I want to be able to count how many orders were created in a given week/month/year whatever my selection may be.  I get the error "nested aggregation not allowed"  when i attempt to count the $(vFirstOrderDate).