Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
QSense
Creator II
Creator 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
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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
Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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
Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Shubham_Deshmukh
Specialist
Specialist

Use peek() in your script,

LOAD

myDate, 

mySale,

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