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

Set analysis -Same date expression


Hi All ,

Please help me in solving the set analysis expression, for finding count of  same day delivered vehicle .

IF ( Invoicedate = Jobopendate)  then it is same day delivered vehicle

Example

Count(  <{Invoicedate = Jobopendate >} VehicleNo)

Thanks in advance

9 Replies
tresesco
MVP
MVP

Try like:

Count(  <Invoicedate={"=Invoicedate = Jobopendate"} >} VehicleNo)

sunny_talwar

Set analysis is evaluated once per chart and won't work in this case. Try this instead:


Count(If(Invoicedate = Jobopendate, VehicleNo))

sunny_talwar

I guess I am wrong. But I thought set analysis is evaluated/calculated once per chart? tresesco‌ would you be able to explain why it will work for this case?

Best,

Sunny

tresesco
MVP
MVP

I have not found mentioning a chart in the question. And you are right, set analysis evaluates once per object, but that necessarily doesn't say that set analysis can't be used in a chart. That would actually depend on the dimension. And, that too not mentioned in the query post. Isn't it? Am i missing something?

maxgro
MVP
MVP

please post your data if possible

if not I'll give you an idea of the syntax

count({<SomeKey = {"=(Invoicedate=Jobopendate)" } >} VehicleNo)

sunny_talwar

I guess you are right. I assumed it to be within a chart

Thanks for clarifying

Best,

Sunny

buzzy996
Master II
Master II

some thing like,

=Count( {$<Invoicedate={'Jobopendate'}>} VehicleNo)

sunny_talwar

tresesco‌ this seems to be working in the chart as well where I have MonthName(Invoicedate) as an dimension.

by this I mean the expression your provided: =Count({<InvoiceDate={"=InvoiceDate = JobOpenDate"}>} VehicleNo)

Not applicable
Author

Hi Shanmuga,

not sure what your model looks like, but if at all possible I would do this comparison in the script and create yourself a flag to use in set analysis instead.

e.g

If(Invoicedate =Jobopendate,1) As Invoice_Open_MatchFlag

then in your expression

Count(  <{Invoice_Open_MatchFlag={1}>} VehicleNo)


hope that helps

Joe