cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to use Filter Line to achieve Cascading Filtering on multiple dimensions?

former_member323943
Discoverer

Hello Experts,

I’m working on Analytics Designer in SAC. As the function of cascading filtering is quite common on the dashboard (e.g. previous Lumira Designer), we want to achieve it on Analytics Designer as well. Component Filter Line seems a good candidate.

However, Filter Line cannot load the data change of source widget during run-time. Also I cannot find any scripting to trigger re-load of its data source. It looks like a one-time loading on the initialization.

If Filter Line can be used as Cascading Filtering, it would be so great!!

Anyone who has some idea or thought, would you please kindly share? A big thanks..

Best Regards,

Tony

Accepted Solutions (0)

Answers (2)

Answers (2)

ashutosh_rastogi
Active Contributor

Hi Tony,

As on today you cannot achieve the cascading of values in Analytics Designer. Would recommend to Voteup following idea https://influence.sap.com/sap/ino/#/idea/236414

-Ashutosh

former_member542603
Participant
0 Kudos

Hi Tony,

To achieve cascading between Drop-down or check-box use the below code.

I have implemented this and it work perfectly.

// Adding values to the drop-down or checkbox initially 

var data=Table_1.getDataSource().getResultMember(); //Retrieves data filtered

Dropdown_1.addItem("All","All");

Dropdown_2.addItem("All","All");

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

{         

Dropdown_1.addItem(data[i]["Dimension1"].id,data[i]["Dimension1"].description);      Dropdown_2.addItem(data[i]["Dimension2"].id,data[i]["Dimension2"].description); 

}

/*Adding values to the drop-down or checkbox during data change of source widget during run-time "OnResultsetChange"*/

Dropdown_1.removeAllItems();

Dropdown_2.removeAllItems();

var data=Table_1.getDataSource().getResultMember(); //Retrieves data filtered

Dropdown_1.addItem("All","All");

Dropdown_2.addItem("All","All");

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

{         

Dropdown_1.addItem(data[i]["Dimension1"].id,data[i]["Dimension1"].description);         Dropdown_2.addItem(data[i]["Dimension2"].id,data[i]["Dimension2"].description); 

}

/* To Achieve Cascading while selecting a value in Dropdown1*/

var sel=Dropdown_1.getselectedtext();

var filtered_values=Table_1.getDatasource.GetResultMember({"Dimension1":sel},0,500);Dropdown_2.removeAllItems();

Dropdown_2.addItem("All","All");

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

{

Dropdown_2.addItem(filtered_values[i]["Dimension2"].id,filtered_values[i]["Dimension2"].description);

}

Table_1.GetDatasource().SetDimensionFilter("Dimension1",sel);