Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: Dimansionality () issue

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

4 Replies

Re: Dimansionality () issue

How about this?

=Pick(Dimensionality(),

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

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

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

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

Highlighted
Not applicable

Re: Dimansionality () issue

Thanks, it also works, but need simplified expression.

Re: Dimansionality () issue

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

Re: Dimansionality () issue

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