Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to categorize some clients into either
The complicating factor is that I am only interested in clients that have had a particular type of appointment.
When I place this expressioin into a chart it gives me the correct results,
When I try and put it into a calculated dimension it fails, I can't figure out why, any ideas?
if( //Re Aiding MaxString( {< [Client Code] = P({<[Reason Group] = {$(ApptType)},Invoice = {'Sale'}>}) >} [Client Code]) >0,'Existing', if( //Second Look MaxString( {< [Client Code] = P({<[Reason Group] = {$(ApptType)},CalendarDate = {'<=$(NewClientDate)'}>}) >} [Client Code]),'Interested', if( //New Client MaxString( {< [Client Code] = P({<[Reason Group] = {$(had ApptType)},CalendarDate = {'>=$(NewClientDate)'}>}) >} [Client Code]),'New', 'Unclasified')))
if(
//Re Aiding
MaxString(
{<
[Client Code] = P({<[Reason Group] = {$(ApptType)},Invoice = {'Sale'}>})
>}
[Client Code]) >0,'Existing',
//Second Look
[Client Code] = P({<[Reason Group] = {$(ApptType)},CalendarDate = {'<=$(NewClientDate)'}>})
[Client Code]),'Interested',
//New Client
[Client Code] = P({<[Reason Group] = {$(had ApptType)},CalendarDate = {'>=$(NewClientDate)'}>})
[Client Code]),'New',
'Unclasified')))
For calculated dimensions you need (often) to wrap your calculation in a aggr() function - have a look here: http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/08/calculated-dimensions
- Marcus