cancel
Showing results for 
Search instead for 
Did you mean: 

Variable in SAP Analytics Cloud Data Model - how it works with Dimension value assigned?

0 Kudos

Hello Experts,

My question is regarding the usage of SAC Data model variable.

I am able to use it in a formula/ calculation in the modeler when defined as numeric in the "Value Domain" parameter of the variable.

However, I want to understand the use case when we map it with Dimension and assign a default dimension member. Can we use it as dimension filter - or derive a calculated dimension from it at story level? While creating a story level calculation I am unable to get the variables into the formula editor.

I want to create a flag as a calculated dimension - Yes/No depending on users input and some condition.

And then want to use the same flag as a filter - selectively on some of the component.

Thanks,

Supriya Das

0 Kudos

One more question regarding the variable - Is it possible to change the variable value run time from Digital Boardroom like we can do it from story?

Accepted Solutions (1)

Accepted Solutions (1)

TuncayKaraca
Active Contributor

Hi Supriya,

I've played with variables a little bit and here my conclusion:

  • You can create Variables in the Model as Numeric, Date and Dimension domains.
  • The variables can be used in the Model - Measure - Formula. So if you have Dimension Domain Variable you can use it with IF statement, etc.
  • Once you used the variables in any formula of Model's Measure then it will be usable on the story level that you can change the values either from Data - Edit Prompts button or you can put them as Story Filters. Tricky thing if you don't use the variables in any formula of the measure in the Model it won't appear on the story.
  • The variables cannot be used on the story level Calculated Measure and Calculated Dimension. Basically the variables drive only Model based formulas / calculations.
  • Once you used the story in the Digital Boardroom you can set new values of the variables as Chart Variables for each chart on the story.

Model - Variables

Model - Measure - Formula

Story

Digital Boardroom

Hello Tuncay,

Thanks for sharing your findings on variable.

I am interested to use the variable as a dimension filter - or even if we can create a Flag in model or story.

For example - If a variable is assigned with a Date dimension - and user choose a Month as "Apr-2019"

then - I want to create one yes/no flag comparing the Variable input with Date Dimension - and that I can use in story.

But right now it is only limited to derive measure values.

On the Digital Boardroom, I get your idea - use this from chart details.

I am more interested to get this enable from the context menu "Filter" or may be with other option, and I think that makes for sense.

Looking forward more flexibility on the Model variable.

With best regards,

Supriya

0 Kudos

Hi Tuncay,

do you know if it is also possible to use the input in data actions? Or if I can pass story filters to the variables?


Regards,

Elisabeth

Hello Tuncay Karaca,

Why we can't apply multiple selection for Dimension variable option ?

if any possible for apply multiple selection for Dimension variable option.

Thanks and Regards,

Logesh.

Answers (1)

Answers (1)

With further exploration on this I am able to perform the Flag based filter.

From variable user input as Date - I compare it with the Date Dimension in a formula to return 0 or 1.

In the story I used same model calculation to define a Measure based calculated dimension.

With this I am able to use the calculated dimension as Filter.

TuncayKaraca
Active Contributor

Wow, that's great Supriya!

What a nice job! Thanks for sharing it.