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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Sergey1
Contributor II
Contributor II

Last sale date (set analyses)

Hi 

I try to got last sales date:

=Max({$<[SalesQuantity]={'>0'}>}TransDate) - Doesn't work

=Max({$<[SalesQuantity]={'=0'}>}TransDate) - Doesn't work

=Max({$<[SalesQuantity]={0}>}TransDate) - Work fine, but 

 How to get the maximum date where SalesQuantity> 0 

Labels (1)
8 Replies
Thiago_Justen_

Try this out:

 

Max({$<[SalesQuantity]={">0"}>}TransDate)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Sergey1
Contributor II
Contributor II
Author

I tried Max({$<[SalesQuantity]={">0"}>}TransDate)

But it doesn't work 

 

 

Frank_Hartmann
Master II
Master II

can u share/upload a sample qvw which demonstates the issue?
Thiago_Justen_

Did you try it  with double quotes? 

 

And what about this?

Max({$<[SalesQuantity]={"=Sum(SalesQuantity)>0"}>}TransDate)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Sergey1
Contributor II
Contributor II
Author

Yes, with double quotes.

Max({$<[SalesQuantity]={"=Sum(SalesQuantity)>0"}>}TransDate) didn't work too
Thiago_Justen_

What about this?

FirstSortedValue(TransDate,-Aggr(Sum(SalesQuantity)>0,TransDate))

 

Or

 

Max( Aggr (If (Sum(SalesQuantity)>0,TransDate),TransDate ) )

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Sergey1
Contributor II
Contributor II
Author

I think I understand the reason
I have calc dimension
=aggr(if(sum([SalesQuantity])=0,[Product]),[Product])

The goal is to get only those products for which there was no sale for the selected period.
This is the reason why there is no sale date))
So I have to remove the period filters when I get the last dates.
Thiago_Justen_

It's an important thing to know...

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago