Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We are trying to write a if caluse to deal with dynamic chart lable, but getting error as below.
lable expression:
=if(GetSelectedCount([Lease Status])>0 ,[Lease Status], 'Active+Inactive')
if(GetSelectedCount([Leased / Owned])>0 ,[Leased / Owned], 'Leased / Owned')
if(GetSelectedCount([Leased / Owned])=0 and GetSelectedCount([Lease Status])=0,'Leased / Owned test')
@Krish2459_58 You are missing "," after completion of If condition. Check the if statement syntax on Qlik help site.
Remember that if condition is evaluated only once and it evaluates row by row. Hence, you need to construct your if in such a way that same condition is not evaluated again.
if(GetSelectedCount([Lease Status])>0 ,[Lease Status],
if(GetSelectedCount([Lease Status])=0 ,'Active+Inactive',
if(GetSelectedCount([Leased / Owned])>0 ,[Leased / Owned],
if(GetSelectedCount([Leased / Owned])=0 and GetSelectedCount([Lease Status])=0,'Leased / Owned test','Leased / Owned')
)))
@Krish2459_58 You are missing "," after completion of If condition. Check the if statement syntax on Qlik help site.
Remember that if condition is evaluated only once and it evaluates row by row. Hence, you need to construct your if in such a way that same condition is not evaluated again.
if(GetSelectedCount([Lease Status])>0 ,[Lease Status],
if(GetSelectedCount([Lease Status])=0 ,'Active+Inactive',
if(GetSelectedCount([Leased / Owned])>0 ,[Leased / Owned],
if(GetSelectedCount([Leased / Owned])=0 and GetSelectedCount([Lease Status])=0,'Leased / Owned test','Leased / Owned')
)))