cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic filter in SAC based on Property select members based on dimension property

UmaArjunan
Active Participant
0 Kudos

Dear Experts,

In SAC 2023 current version Is it supporting to Select members or filter members based on the dimension attributes ?

Please advise

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor
0 Kudos

abap.dev

For Advanced Formula its not possible to use attributes to filter selection in prompts parameters. It supports only members. You can use attributes in the Formula code block though to filter out members in IF ENDIF block.

Hope this helps.

Nikhil

UmaArjunan
Active Participant
0 Kudos

with in IF and ENDIF block any other command would work to skip certain dimension members from writing the data during the posting of final results / can write any log message to Data action monitor

N1kh1l
Active Contributor
0 Kudos

abap.dev

I am not sure of what you are trying to achieve but if you want to skip certain members from being written, The IF ENDIF should only check for TRUE condition. For e.g. If I only want to write back to first Quarter months I will structure my IF like below.

IF [d/Date].[p/QUARTERDESC]="Q1" THEN
	DATA()=1 // sample data
ENDIF

Also you can only scope the records based on a member attribute so that my dataset gets restricted in first place itself.

MEMBERSET[d/Date].[p/YEAR]="2023"

I would suggest you better explain your actual requirement to help you better.

Nikhil

Answers (1)

Answers (1)

sourabhpaul
Participant
0 Kudos

Hi,

You can use filtering in the story and analytic app as well. But in stories, filtering can be done on dimension members. if you want to filter through dimension attributes then it will only be available in the analytic designer. for this, you have to select a chart or table created from your data source which you want to use filtering. then the code will be:

var dim_details = Chart_name.getdataSource().getmembers("dimension_Name"); //By using this line of code you will get all the dimension members along with associated dimension properties as an Object.

Then you can use a for loop to iterate over the object dim_details and pick up all dimension property values. then you can use that property values to filter charts and tables.

The loop format should be this to add values in a checkbox group:

for(var i = 0;i<dim_details.length;i++){

checkbox_group_name.additem(dim_details[i]."Property_name");

}

UmaArjunan
Active Participant
0 Kudos

Thanks for the reply , We are trying to achieve this in stories - Advanced formula editor as a filter for dynamic selections for the user prompt.

sourabhpaul
Participant
0 Kudos

See if you want to use it in stories then you can use optimized story design and then you can use advanced mode through which you can use scripting. if my answer helps you then please accept my answer.