Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Strange If function behaviour...

 

I have a "drop down" widget on a report that can take 3 values: "Region", "Office" or "Top25". Whichever is selected is stored in the variable vBaseline.

If I create a "Text and Image" object on my report and use the following expression:

if(vBaseline='TOP25',

TOP25',

if(vBaseline='A_CON_OT_REGION' or vBaseline='A_CON_OT_OFFICE',

'Region or Office’,

'XX'

))

 

...it behaves as expected: When I change the dropdown object the value returned by the expression is as correct. If, however, I now replace 4th line as per below it misbehaves:

if(vBaseline='TOP25',

'TOP25',

if(vBaseline='A_CON_OT_REGION' or vBaseline='A_CON_OT_OFFICE',

Avg({1<$(vBaseline)=P()>}A_CON_DS_P_LEAVE),

'XX' 

))

If I select region or office in the drop down then I get the correct value (as calculated by the 4th line). If I select "TOP25", however, I now get a NULL response!!!!

 

I would love to able to solve this one!

 

0 Replies