Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

carolin01
Contributor II

Dual function in Qlik Sense

Hi,

I have the following function in my script which I used for Qlik View before. Now I would like to transfer that script to Qlik Sense but some function like e.g. Dual seem not to work in Qlik Sense. As I got this function from a consultant I´m not sure what dual does. Is anybody able to change it:

Dual('Q' & Ceil(Month(CloseDate)/3) & '-' & Right(Year(CloseDate),2), Year(CloseDate) & Ceil(Month(CloseDate)/3)) as [Opportunity Close Quarter/Year],

Further I have the following function:

if(IsClosed = 'false' and CloseDate >= '$(vExecTime)', 'OPEN', 'CLOSED') as [Opportunity Status]

Is this the correct translation, because Qlik Sense seems not to work with "and":

if(IsClosed = 'false', if( CloseDate >= '$(vExecTime)', 'OPEN', 'CLOSED')) as [Opportunity Status],

Many thanks in advance.

Carolin

1 Reply
MVP
MVP

Re: Dual function in Qlik Sense

May be this for Dual function:


Dual('Q' & Ceil(Month(CloseDate)/3) & '-' & Right(Year(CloseDate),2), QuarterYear(CloseDate)) as [Opportunity Close Quarter/Year],


And this for translation:

If(IsClosed = 'false', If(CloseDate >= '$(vExecTime)', 'OPEN', 'CLOSED'), 'CLOSED') as [Opportunity Status],