ANY and ALL in Anaplan

ANY is TRUE when at least one mapped source cell is TRUE. ALL is TRUE when every mapped cell is. Where nothing is mapped, ALL returns TRUE in Classic and FALSE in Polaris, so guard it.

By , Anaplan architect at MaxPlan and Master Anaplanner. Updated .

What is the syntax of ANY and ALL?

Source[ANY: Mapping, ANY: Mapping 2]
Source[ALL: Mapping, ALL: Mapping 2]

The source is a Boolean. The mapping sits with the source, like in SUM, and is formatted as a list that the target has.

ANY and ALL examples

Does the customer have a late order? Are all its orders paid? Both by Customer:

Orders.Is late[ANY: Orders.Customer]
Orders.Is paid[ALL: Orders.Customer]

With Is paid as the source of both:

ANY and ALL of Is paid by customer
CustomerOrders paidANY is paidALL is paid, ClassicALL is paid, Polaris
AcmeYes, yesTRUETRUETRUE
BirchYes, noTRUEFALSEFALSE
CedarNo, noFALSEFALSEFALSE
DuneNo ordersFALSETRUEFALSE

Two mappings give a grid, here late orders by Customer and Product:

Orders.Is late[ANY: Orders.Customer, ANY: Orders.Product]

Why is ALL TRUE when there is no data?

In Classic, cells that nothing maps to default to TRUE. Dune has no orders and still counts as fully paid. Polaris defaults to FALSE, so the same formula can give a different answer after a migration. Add an ANY on a Boolean that is TRUE for every order, and both engines agree:

Orders.Is order[ANY: Orders.Customer] AND Orders.Is paid[ALL: Orders.Customer]

When should you use ANY?

When you want to know whether something exists. It replaces a count compared with 0, and it keeps the answer in a Boolean. A number used as a yes/no flag takes about eight times the memory. It also replaces many uses of TEXTLIST, and counts unique list items without ISFIRSTOCCURRENCE. Check your own model for all three.

ANY and ALL are summary methods too. Planual 2.02-09, tagged Classic only, recommends them to save line items and IF statements.

Sources

Check your model

Upload the line-items blueprint. The basic check runs in your browser and needs no email.

Check your model