cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RESULTLOOKUP/RESTRICT Not Accepting <=, >=, <, > Operators in SAC

poklluka
Newcomer
0 Likes
227

Hello everyone,

I believe I have encountered a bug in the SAP Analytics Cloud Formula Editor, both at the model level and within stories.

When creating a calculated measure using functions such as RESULTLOOKUP or RESTRICT, the second parameter (which defines the filter conditions) does not accept comparison operators such as:

  • <=

  • >=

  • <

  • >

Whenever I use one of these operators in the filter block, SAC returns the following error:

“Formula could not be computed: Function 'RESULTLOOKUP' expects parameter 2 to be a list of conditions joined with AND. Please complete or rewrite the formula.”

However, using = or != works fine.

 

Restrict with '='Restrict with '='Restrict with '<='Restrict with '<='Restrict with '<'  simple exampleRestrict with '<' simple example

This limitation prevents me from implementing formulas that require range-based filters.
For example, I need to create a custom YTD calculation that retrieves values up to a specific period entered through a story parameter.

I also need additional measures that depend on parameters (e.g., current period, inception-to-date, etc.).
I found partial workarounds—such as creating restricted measures in the story using “less than or equal” input controls—but this quickly becomes inefficient. Each measure would require its own input control, meaning the customer would need to select the period multiple times, which is not a good user experience.

I also tried using an IF() statement inside a calculated measure, but then I am forced to display the required dimensions in the table, which is not acceptable from a reporting layout perspective.

My starting requirement is to build a report similar to the “Billing Extract for Invoice/Statement” available in:

  • SAP S/4HANA Public Cloud → via the app “Schedule Job for Billing”,

  • SAP S/4HANA on-premisetransaction code GJ12.

Billing extract for invoices-statements report.png

To replicate the logic in SAC, I need the ability to filter by period ranges using operators such as <=, which is currently failing in the Formula Editor.

Questions

  • Is this a known limitation or bug in SAC?

  • Is there a planned fix?

  • Is there an official workaround that avoids multiple input controls and avoids exposing dimensions in the table?

Thank you in advance for your help,

poklluka.

Click to expand Click to expand Enterprise Resource Planning category Click to collapse Enterprise Resource Planning category

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

@poklluka 

This is not a bug but the current behavior of SAC with respect to RESTRICT/LOOKUP functions. The reason for this is that most of the master data in SAC is in text format and hence operators like Greater than/less than do not make sense. Only = and != works with text format hence they are supported. FISCAL period is not a number as you are assuming, its  a text/string format.

There are dedicated formulas for creating YTD using dynamic time restrictions. You should explore them.

https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/df0e123a79624e68a0735...

 

Hope this helps !

Nikhil

 

Answers (0)