Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

MVP
MVP

Re: Scripting

I think I know what the problem is. A dual value can only have one possible text representation for a numerical value. The real value of the dual is the numeric - the text is only the display representation of the value.

I expect that you have a POLICY_PERIOD value somewhere else for POL_PERIOD_FROM = 31 March (Mar-16 - Mar-27).  In the model, the dual will be stored as a numeric with a single display format. So the display value for 31 March 2016 is the value in POLICY_PERIOD. 

If you want to correctly reflect you would have to create a numeric value that considers both the _FROM and _TO fields. You could try this if you want to return a valid date value that reflects the FROM date:

Dual(Date(POL_PERIOD_FROM, 'MMM-YY') 
     & ' - ' &
     Date(POL_PERIOD_TO, 'MMM-YY'), 
POL_PERIOD_FROM + POL_PERIOD_TO/100000
) as POLICY_PERIOD,

 

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post