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

Check which coloumn contains the first value

Hi there,

I have a hierarchy of some groups with subgroups, but there exists some groups which don't contains an information in every hierarchy level. I need the field ATLG_Kode.

Sure, i can use some nested if-clauses

if(not isnull(ATLG_Ebene6Kode),ATLG_Ebene6Kode,
if(not isnull(ATLG_Ebene5Kode),ATLG_Ebene5Kode,
if(not isnull(ATLG_Ebene4Kode),ATLG_Ebene4Kode,
if(not isnull(ATLG_Ebene3Kode),ATLG_Ebene3Kode,
if(not isnull(ATLG_Ebene2Kode),ATLG_Ebene2Kode,
ATLG_Ebene1Kode))))) AS ATLG_Kode,

But does not exists a smarter way to do this???

1 Reply
sunny_talwar

May be this

Alt(ATLG_Ebene6Kode, ATLG_Ebene5Kode, ATLG_Ebene4Kode, ATLG_Ebene3Kode, ATLG_Ebene2Kode, ATLG_Ebene1Kode) AS ATLG_Kode,