Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QSense
Contributor II

Product Hiearchy get up level's name

Hello ,

I have a case . There is  an hiearchy table in my app . I would like write if statement in a straight table.

In my table below, I will add new calculate dimension.

My script like ;

 

LevelUPIDLevel_Explanation
ABC28172839ABC explanation
ABC.128392841ABC.1 explanation
ABC.1.1   

 

At then end I would like to get this result (red  one)

my script would like ; for ABC.1 row

if (one condition satisfies ,  match(up,level_explanation) ) // I dont know which function is used here. 

I would like to get one up level's level explanation.

LevelUPIDLevel_ExplanationUP Level Explanation
ABC28172839ABC explanationnull
ABC.128392841ABC.1 explanationABC explanation
ABC.1.1    

 

 

Thanks in advance.

Labels (2)
1 Solution

Accepted Solutions

Re: Product Hiearchy get up level's name

Hi,

A small change in script will get you desired result with no hassle.

Try below script;

Data:

Load Level,UP,ID,Level_Explanation From XYZ;

Left join (Data)

Load ID as UP,Level_Explanation as UP_Level_Explanation From XYZ;

 

Regards,

Kaushik Solanki

 

LevelUPIDLevel_Explanation
2 Replies

Re: Product Hiearchy get up level's name

Hi,

A small change in script will get you desired result with no hassle.

Try below script;

Data:

Load Level,UP,ID,Level_Explanation From XYZ;

Left join (Data)

Load ID as UP,Level_Explanation as UP_Level_Explanation From XYZ;

 

Regards,

Kaushik Solanki

 

LevelUPIDLevel_Explanation
Shubham_Deshmukh
Valued Contributor

Re: Product Hiearchy get up level's name

Use peek() in your script,

LOAD

myDate, 

mySale,

if(condition,peek(mySale)) as expectedOutput
FROM --------