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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

if statement in expression using a calculated dimension

hi

I have this dimension calculation which just groups two specialties together:

=if(CurrentSpec='ENDOC' or CurrentSpec='DIAB','DIAB/ENDOC',CurrentSpec)

then in an expression I need to allocate a number of beds to the specialty:

but it is not recognising my calculated dimension so i added the calucation back in but it still wont alocated a number to thtat combined specialty.

(i did have if(CurrentSpec='ENDOC' or 'DIAB','21',  but this also didnt work)

if(if(CurrentSpec='ENDOC' or CurrentSpec='DIAB','DIAB/ENDOC',CurrentSpec)='DAIB/ENDCO','21',

if(CurrentSpec='CARD','18',
if(CurrentSpec='ELM','52',
if(CurrentSpec='GASTRO','28',
if(CurrentSpec='RESPMED','26',0)))))

is there a way of doing this other than maybe combining the speicalties in the script; but its always good to see them seperate in the raw data.

thanks for you help

10 Replies
qliklizzy
Creator II
Creator II
Author

thanks, i will have a further read on this when i have some more time.

We had some external suppliers help with the set up of these apps - i dont think i want to mess around with security without properly reading up on it.

thanks for all your help,