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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested If statement not working

I need to display a stacked bar chart with  2015, 2016 , 2016-Q3, 2016-Q4 and 2016 - Jul  as X axis, whereas Jul is in the third quarter as per the calendar.

=if(FY_12='2015',FY_12,(if (FY_12='2016' and Quarter_12='3',FY_12&'-Q'&Quarter_12,(if (FY_12='2016' and Quarter_12='4',FY_12&'-Q'&Quarter_12,(if(FY_12='2016' and Month_12='Jul',

FY_12 & '-'& Month_12,(if (FY_12='2016',FY_12,)) ))

)))  ))

As per the above if condition, the charts are not displaying values for 2016-Jul. Could someone help me in tweaking this if condition?

12 Replies
tamilarasu
Champion
Champion

Hi Arunkumar,

Try this,

=if(FY_12='2015',FY_12,

     if(FY_12='2016' and Match(Quarter_12,'3','4'),FY_12&'-Q'&Quarter_12,

       if(FY_12='2016' and Month_12='Jul',FY_12 & '-'& Month_12,

           if(FY_12='2016',FY_12

              )

          )

       )

     )

If it's not working, I would suggest to post a sample application.

shraddha_g
Partner - Master III
Partner - Master III

Also you can try

if( wildmatch(FY_12,'2015','2016') , FY_12,

       if(wildmatch(FY_12,'2016')  and wildmatch( Quarter_12,'3','4'), FY_12&'-Q'&Quarter_12,

                        if(wildmatch(FY_12,'2016')  and wildmatch( Month_12,'Jul') ,FY_12 & '-'& Month_12

                           )))

sasiparupudi1
Master III
Master III

If you are using this as a calculated dimension, you need to add the same logic in your expressions otherwise it is not going to show the results.

Please post a sample