Highlighted
Contributor

Retrieve dimension as line item

Hi,

I need to retrieve the selected dimension as a line item. For example, imagine I have a list with three items, Scenario 1, Scenario 2 and Scenario 3. What I need is some kind of function so that I can return the selected dimension, for example Scenario 1 in a line item.

Any help is appreciated, thanks a lot!

5 REPLIES 5
Highlighted
Master Anaplanner/Community Boss

Re: Retrieve dimension as line item

@fredrickstraube 

the function is called ITEM

 

https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/ITEM.html

 

Be aware though, that this will only need the dimension itself, so if you are needing to return the code, or name or checking for a specific item, DO NOT do this calculation in a multi-dimensional module.  Do it in a module dimensioned purely by the list referred to in the ITEM(List) formula and then point subsequent line items to that; much more efficient for calculations

Also, try and avoid IF ITEM() =.  Use boolean logic instead, this is more flexible

I hope this helps

David

Highlighted
Contributor

Re: Retrieve dimension as line item

Hi David,

Thanks a lot, this is what I needed!

Another question: I now have two modules, looking like the pictures below:

1.1.PNG

No dimensions, just 2 line items formatted as List and Time Period - Month

1.2.PNG

Two dimensions, Time and The same list as the "From"-line item in the picture above

What I ultimately want to do is to get the boolean checked if the month is selected in the "From Date" line item in the first picture, but I can't get that formula to work, since I cannot do a lookup on time. What I tried was something like IF owner=From [LOOKUP:From date] THEN TRUE ELSE FALSE

Do you have any suggestions on how to approach this issue? Thanks!

Highlighted
Master Anaplanner/Community Boss

Re: Retrieve dimension as line item

What you need here is a SUM equivalent for non numbers

 

For BOOLEANS you can use ANY (my favourite function), for Time Formatted, and List Formatted Line item FIRSTNONBLANK, or LASTNONBLANK can be used

This page is essential reading:

https://help.anaplan.com/anapedia/Content/Calculation_Functions/CF_Aggregation_Functions.html

 

See the following example:

2019-08-08_12-21-36.png

 

2019-08-08_12-22-16.png

 Volia!

David

 

Contributor

Re: Retrieve dimension as line item

@DavidSmith,

This is EXACTLY what I needed, many thanks!

/Fredrick

Highlighted
Master Anaplanner/Community Boss

Re: Retrieve dimension as line item

Excellent

Glad to help

David