Hi I am trying to filter the measures of a table with a dropdown.
I have followed these two tutorials but it does not work.
Best Practice: Filter Table and Chart Through Dropdown (Single Selection) | SAP Help Portal
33. Filtering table through Dropdown in Analytics Application ( SAP Analytics Cloud) - YouTube
My script is as follows:
OnInitialization:
My dataset name is NEWSTOCK and it has 6 measures.
The chart will change, but keeps on adding measures (I have fixed this in a problem were I only have charts another way). But the table will not change. The measures do appear in the dropdown and seem to be written right in the console.log().
I maybe think the problem lies with the value NEWSTOCK, this is the only point that differs from the tutorial that I see? Does anyone know what I am doing wrong?
Kind regards,
Rick
Request clarification before answering.
Hi @Rick05,
I tried the same scenario filter measures in table I have below measure's as shown in table
2. I used below script on dropdown.
var selectedMeasure = Dropdown_3.getSelectedKey();
if(selectedMeasure ==="Quantity"){
Table_5.getDataSource().setDimensionFilter(Alias.MeasureDimension,["Quantity"]);
}else{
Table_5.getDataSource().setDimensionFilter(Alias.MeasureDimension,["Discount"])
;
Table_5.getDataSource().setDimensionFilter(Alias.MeasureDimension,["Profit"]);
Table_5.getDataSource().setDimensionFilter(Alias.MeasureDimension,["Sale"]);
3. Its filter according to measures selection
4. If I select Sale it will filter as per Sale's Measure
OR
Same Scenario you can do with "Measure Input Control" you don't need to be write script it will work on both chart and table
2. Add Measure Input control and remove other measure's
Kindly upvote if you find it helpful!
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Yogeshwar_M ,
This solved my problem, the script to filter measures of a table works.
Kind regards,
Rick
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.