I am really stuck and i didn't find anything helpful,
I want to show measure and dimension on click event through button through scripting in sac story.
my model name is "account" my measure name is "net_sales" my dimension type is account. appearantly there is no error in it. but i am not getting anything when click on button
// Chart_1.getDataSource().setDimensionFilter("Account", ["Revenue"]);
// Chart_1.getDataSource().setMemberDisplayMode(Feed.CategoryAxis,"net_sales");
Chart_1.addDimension("account",Feed.CategoryAxis2);
// Chart_1.addDimension("account",Feed.CategoryAxis2);
console.log(['dimension',Chart_1.addDimension("Revenue",Feed.CategoryAxis2)]);
Chart_1.addMeasure("[account].[parentId].&[A100000]",Feed.ValueAxis);
console.log(['measure',Chart_1.addMeasure("[account].[parentId].&[A200100]",Feed.ValueAxis)]);
// Chart_1.addMeasure("[account].[parentId].&[A200100]",Feed.ValueAxis);
Request clarification before answering.
Please try the below.
// Clear previous chart data
Chart_1.removeDimensions();
Chart_1.removeMeasures();
Chart_1.addDimension("account", Feed.CategoryAxis);
// Optional: filter the dimension to a specific member
// Uncomment the next line if you want to show only "Revenue"
// Chart_1.getDataSource().setDimensionFilter("account", ["Revenue"]);
// Add the measure to Y-axis
Chart_1.addMeasure("net_sales", Feed.ValueAxis);
// Refresh the chart to apply changes
Chart_1.update();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| 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.