Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Need to realise tree structure in Pivot table, where Price is not summed on diffirent levels.
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
Hi,
one solution without hard coded NodeDepth or dimensionality values in the expression might be:
-(Dimensionality()=Min(NodeDepth))*FirstSortedValue(Price,NodeDepth)
hope this helps
regards
Marco
How about this?
=Pick(Dimensionality(),
Only({<NodeDepth={1}>}Price),
Only({<NodeDepth={2}>}Price),
Only({<NodeDepth={3}>}Price),
Only({<NodeDepth={4}>}Price))
Thanks, it also works, but need simplified expression.
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
Hi,
one solution without hard coded NodeDepth or dimensionality values in the expression might be:
-(Dimensionality()=Min(NodeDepth))*FirstSortedValue(Price,NodeDepth)
hope this helps
regards
Marco