cancel
Showing results for 
Search instead for 
Did you mean: 

Access Measures from 'Create calculated dimension' Tool

0 Kudos

Hi everyone,

I am very new to PA (2.5, trial version) and still have few questions about it. Since I come from "R", I am mostly interested in the Expert mode.

My question is related to the creation of a new dimension in the Prepare room. Actually I would like to reproduce the Automated process when finding a dimension with let say Null/<empty> values, if the dimension is numerical: i.e. I intend to create a new dimension where any Null values are replaced by the Average dimension value.

From the prepare room, I am perfectly able to filter the dimension and retrieve any row with Null value but I cannot replace them directly (limitation from trial version ?).

Hence I decided to create a new dimension from "Create calculated dimension"; however in the "script edition" panel I cannot access to the Measures I have created. So if I do not know the exact value of the Average, I cannot go this way.


Finally, I found a (quite tedious) way going through the Predict room :

1) add a Formula component to my initial data set that is able to compute the Average

2) write the filtered data set

3) go back to Prepare room

4) add a new data set (the one formely created)

5) merge the two data sets

6) create a new calculated dimension from the original dimension + the second dimension containing the Avg => if IsNull(val) then {Average-val} else {val}

I assume I would do the same if instead of replacing Null values by the Average I would like to use a predictive model (regression for instance)?


If this seems to work on my small CSV data set, I assume there is a nicer way to proceed??


Thank you!

R.

Accepted Solutions (1)

Accepted Solutions (1)

abdel_dadouche
Active Contributor
0 Kudos

Hi Romain,

The Trial version is the same version as the licensed version with the exception that it will expire after 30 days. So features wise it is exactly the same.

In the Predict room, only dimensions are considered when using any of the nodes as you may have noticed. This is why you don't get access to measures.

In fact, the measures in the Prepare room is a legacy from the Lumira framework, and mimic what you have in the Visualize room. The sole purpose of measures is to be used within a visualization.

Moreover, the measures values are computed on-the-fly based on the dimensions used in the visualization (as a group by condition).

I hope this clarifies your point.

I can also recommend you to submit a new entry in the idea place for predictive : SAP Predictive Analytics Idea place. in order to ease/improve the creation of multiple formulas in the Expert mode, and I will definitely vote for it!

Best Regards

@bdel

0 Kudos

Hi Abdel & thanks for your reply.


What I still do not understand is why the mathematical functions (e.g., AVG, SUM, etc.)  are only available on the Predict room and not in the Prepare Room.

My described method is more a Preparation step than a Predict one, isn't it?

If you confirm me that there is no other way I will definitively put en entry in the PA Idea Place, good advice!

Best regards,
R.

abdel_dadouche
Active Contributor
0 Kudos

Hi,

I completely understand your point.

The create "New Calculated Dimensions" in the Prepare room and in the Visualize room is a totally different feature from the "Formula" node in the Predict room.

The create "New Calculated Dimensions" and "New Calculated Measures" were both inherited from the Lumira framework, as well as the concept of Dimensions which we don't leverage in the Predict room..

This is one of the reasons why the Advanced Analytics team implemented the "Formula" node, to overcome these limitations. This is also why we have a node for "Filter" because the one in the Prepare room couldn't meet our need.

I will definitely encourage you to leverage the Predict room to achieve your goal in term of data preparation instead of the Prepare room.

I think you can enter 2 ideas with the first one being the ability to build multiple formulas in a single Formula node and the second being the alignment of function in the Formula node and the "New Calculated Dimensions".

Let me know the ideas number so I can vote for then, and make sure you add a reference to this blog entry for reference.

Best Regards

@bdel

Answers (0)