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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
johngouws
Partner - Specialist
Partner - Specialist

Conditional Formatting with common calendar

Hi All. 

I have a app I am converting from using a Gregorian calendar to a Financial calendar. I am using the Common Calendar concept by Rob Wunderlich. So far everything has gone very well, until reaching one object where I need to highlight where certain Vehicle Licences need to be highlighted, based on their expiry date. 

As part of the Common Calendar I have a DateType of 'Veh_Lic'. When I select the DateType field, 'Veh_Lic', the color and text conditions show up correctly. If I do not select the 'DateType' 'Veh_Lic', all the Expiry Flag rows show as OK. I would like to have the 'DateType' 'Veh_Lic' built into the expression itself so the user does not need to make a selection. 

Further info: the field [_BaseMonth] is created in the loadscript and is made up from Year(Today())*12 + Month(Today()). When I have a table the Months and [_BaseMonth] do correspond. 

The current expression for the text condition is below. This expression still works in the Gregorian version. 

"=if(AGGR(Year(Today())*12 + Month(Today()),[Registration Number]) = AGGR([_BaseMonth],[Registration Number]), 'Current Month',
if((AGGR(Year(Today())*12 + Month(Today()),[Registration Number]))+1 = AGGR([_BaseMonth],[Registration Number]), 'Next Month',
if(AGGR([_BaseMonth],[Registration Number]) < AGGR(Year(Today())*12 + Month(Today()),[Registration Number]), 'Expired', 'OK')))" 

I have tried placing the {<DateType={'Veh_Lic'}>} in various places, without success. Please could someone assist with this? The screenshot shows the color and text condition working when the 'DateType' 'Veh_Lic' is selected. 

 

Conditional.JPG

Thank you very much. 

 

0 Replies