Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to get the only products not sold during the selected period and if those products has been sold any time out of the selected period, then show the last day of sold. I have itemname,invoiceDate and Date fields.
I'm assuming that the Date field is used for the date selection and the invoiceDate field is part of the Sales data...
I'd use something like this:
count(
{<Itemname = E({<invoiceDate = P(Date)>} Itemname ) >}
distinct Itemname)
For the second expression, showing the late of the last sale:
date(max(
{<Itemname = E({<invoiceDate = P(Date)>} Itemname ) >}
invoiceDate))
The Set Analysis condition is excluding the values of Itemname that are associated with the invoiceDate values that belong to the selected period of Dates - facilitating the required condition of excluding the items that were sold in a give period of time.
cheers,
Oleg Troyansky
Learn Set Analysis and other advanced techniques in my book QlikView Your Business.