Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

New 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???

Tags (1)
1 Reply

Re: Check which coloumn contains the first value

May be this

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