Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
How can I write the below sql case statement in Qlik sense
CASE WHEN [MY ORG CODE] = '11NA' THEN 'MY ORG NAME' ELSE [MY ORG CODE] END
I have tried using match but I am not getting the correct results
=match([MY ORG CODE], '11NA', 'MY ORG NAME', [MY ORG CODE])
Thanks any help appreciated
Ian
Why did you not try an actual IF statement?
if([MY ORG CODE] = '11NA', [MY ORG NAME], [MY ORG CODE]) as [MY ORG CODE]
if - script and chart function ‒ Qlik Sense
Why did you not try an actual IF statement?
if([MY ORG CODE] = '11NA', [MY ORG NAME], [MY ORG CODE]) as [MY ORG CODE]
if - script and chart function ‒ Qlik Sense
if( Match([MY ORG CODE] , '11NA' ), 'MY ORG NAME' ,[MY ORG CODE])
Regards,
Vanraj Dinesh Bohra
Another option using Pick() function
Pick(Match([MY ORG CODE], '11NA') + 1, [MY ORG CODE], 'MY ORG NAME') as FieldName
Thanks. That worked
Match is not needed and would only slow things down.