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: 
Not applicable

Filtering a variable

Hi Guys,

Ok so basically what im trying to do is get the Maximum date of a specific field in a variable

Set LastUnconfirmedSaleDate= =max( { 1 <Product={'*'}> , <ref = {'U'}>} Dates);

it must be for all products and the ref must be for U can someone correct my syntax/Logic ?

Regards

Curt

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You don't need the middle angled brackets, so try:

Set LastUnconfirmedSaleDate= "=max( { 1 <Product={'*'},ref = {'U'}>} Dates)";

Jonathan

View solution in original post

4 Replies
Anonymous
Not applicable
Author

You don't need the middle angled brackets, so try:

Set LastUnconfirmedSaleDate= "=max( { 1 <Product={'*'},ref = {'U'}>} Dates)";

Jonathan

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

LET LastUnconfirmedSaleDate= max( { 1 <Product={'*'} , <ref = {'U'}>} Dates);

Regards,

Jagan.

Not applicable
Author

Thanks that works , slightly off topic but is there a way to get the sum from only a single table

I.E. Set TotalAgents= =count({1} salesCode); I only want the count of salescode from oen table(agents) and not from the joining tables so i basically want to excludes sales codes from any other tables

Anonymous
Not applicable
Author

When you load in your tables create a duplicate of the field you are interested in, on the table you're interested in, and count that instead.

Else you can create a field with a value of 1 and do a sum on that field. That would be more efficient.

Jonathan