Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm attempting to build an expression using the count function that shows me the count for a dimension based on a date. The current expression I have is as follows:
=Count({$<[POS Date]={'10/31/2014'}>}[Instrument Type])
Any idea why it does not work?
The set expression search string needs to be closed with a double-quote.
=Count({$<[POS Date]={"$(=Date#('10/31/2014','MM/DD/YYYY'))"}>}[Instrument Type])
However, there is no point in making a static calculation like =Date#('10/31/2014','MM/DD/YYYY') in the set expression. This will only result in a text looking like 10/31/2014, meaning that the calculation just makes the expression look more complex and wastes time for one calculation. Just write the date direct in the expression, and this is equal to the expression above.
=Count({$<[POS Date]={"10/31/2014"}>}[Instrument Type])
Toni,
Thanks for the response, however I am still unable to get the expression to function. When I use just the following:
=Count([Instrument Type])
I get the following results:
When I try your expression, no results are returned when I know there should be.
Can you post sample app
It turns out the way I loaded the data was in a format that was inconsistent. I changed the format and reloaded and this worked.
Thanks.
Probably the [POS Date] field doesn't contain anything recognizable by QlikView as a date. Can you post a screenshot of a [POS Date] listbox? Or a small test document?
In the meantime and on condition that you're not using a PE Desktop, check out Massimo's example higher up.
Peter