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

SAC - Measure Column Script in onActive Function

dlyvf
Explorer
0 Likes
576

Hi, 

I create stories by connecting to HANA with live connection in SAP Analytics Cloud.

I created a measure column in the story (counting a dimension). I want to filter my table using this measure column but I want to do it in the script.

We can filter the dimension column by writing: Top_Table.getDataSource().setDimensionFilter("Dimension_Column_Name",{value: "XX"}):;

Can we filter the measure column in script?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

RajuRam
Active Participant
0 Likes

Hi,

The function setDimensionFilter() works only on dimensions, not on measures. When you create a measure column in the story, such as counting a dimension, it exists only in the SAC front-end layer and is not part of the HANA query. Because of this, you cannot directly filter a table on that calculated measure through scripting. Instead, you can push the logic to HANA by creating the calculated measure in the HANA view and then filter it using a variable or you can use ranking or thresholds directly in the SAC table without scripting.