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

Dimansionality () issue

Hi,

Need to realise tree structure in Pivot table, where Price is not summed on diffirent levels.

screen.png

It works when i use such expression, but actually there are more levels.

=

if (

Dimensionality()=1, only({<NodeDepth={1}>}Price),

if(Dimensionality()=2, only({<NodeDepth={2}>}Price),

if(Dimensionality()=3, only({<NodeDepth={3}>}Price),

if(Dimensionality()=4, only({<NodeDepth={4}>}Price)

))))

Try to use Pick () Match(), but it doesn't work with Dimansinality()

=  only({<NodeDepth={"$(=pick(Match(Dimensionality(),1,2,3,4)1,2,3,4))"}>}Price)

Pls let me know if you have any ideas

Thanks

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one solution without hard coded NodeDepth or dimensionality values in the expression might be:

-(Dimensionality()=Min(NodeDepth))*FirstSortedValue(Price,NodeDepth)

QlikCommunity_Thread_234330_Pic1.JPG

QlikCommunity_Thread_234330_Pic2.JPG

QlikCommunity_Thread_234330_Pic3.JPG

hope this helps

regards

Marco

View solution in original post

4 Replies
sunny_talwar

How about this?

=Pick(Dimensionality(),

Only({<NodeDepth={1}>}Price),

Only({<NodeDepth={2}>}Price),

Only({<NodeDepth={3}>}Price),

Only({<NodeDepth={4}>}Price))

Not applicable
Author

Thanks, it also works, but need simplified expression.

sunny_talwar

Not sure if it can be simplified any further, but I will wait to see if someone has a better advice. May be marcowedel

Best,

Sunny

MarcoWedel

Hi,

one solution without hard coded NodeDepth or dimensionality values in the expression might be:

-(Dimensionality()=Min(NodeDepth))*FirstSortedValue(Price,NodeDepth)

QlikCommunity_Thread_234330_Pic1.JPG

QlikCommunity_Thread_234330_Pic2.JPG

QlikCommunity_Thread_234330_Pic3.JPG

hope this helps

regards

Marco