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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set expression in Min() leads to '-'

I have a test-table with one dimension:

product_id

I have the measure Min(price)

to check whether  there is data or not.

I have a min price for each product_id, so do I if i select the last date by myself.

But if i try to use a set expression to ensure that the min price shows the data for the last date, i only have "-" signs in the column.

Min({ $ <filter_date = {'$(=date(floor(Max( {$<[filter_date]=>} discoverydate))))'} price)

I checked the inner

=date(floor(Max( {$<[filter_date]=>} discoverydate)))

too, and it has the intended date which i want to use as filter_date.


any ideas?

17 Replies
MK_QSL
MVP
MVP

filter_date must have DD.MM.YYYY format...Otherwise you need to format as below

Min({$<filter_date = {"$(=Date(Floor(Max({$<[filter_date]=>} discoverydate)), filter_date_format))"} price)

sunny_talwar

So you are unable to see the min price where filter_date = 16.02.2016? when you use your Min() expression?

sunny_talwar

You are using it in Aggr() function, I think you need to use it in Min:

count(

  { $ <calc_merchant = {"OWN_CLIENT_DATA_FLAG"},

    [filter_date]= > }

  distinct if(

    aggr(rank(-min( { $ <filter_date = {'$(=date(floor(Max( {$<[filter_date]=>} discoverydate))))'} > }price),1,1), product_id, calc_merchant) = 1, product_id

        )

  )

Not applicable
Author

I made 2 Screenshots, because I am still unable to share any data (NDA and size)

1. text.string inside the Set expression works:

filter_date1.png

2. function in the set expression does not work:

filter_date2.png

MK_QSL
MVP
MVP

Can you provide sample application?

Not applicable
Author

As mentioned above i use real client data which is "secret".

Thus (and because of the app-size) I cannot attach an app.

Sorry for that, I know this would made things much more easy.

Big Thx for your help so far.

great community!

MK_QSL
MVP
MVP

Yes, we can understand that you can't provide original data, but obviously you can create some dummy date and post them in excel here !

Not applicable
Author

OMG...

It was a typo all the time...

the closing " >} " was missing all the time

even in your suggestions we kept missing it.

and the syntax-check don't get it in this case.

anyway i appreciate your help very much.