The removeAllCalculatedMeasures and addCalculatedMeasure are not working, even in the jsfiddle: https://jsfiddle.net/flexmonster/79keh0ee/
Can you please advise.
Hello Meir Hadassi,
Thank you for your question. Could you please check the jsfiddle again https://jsfiddle.net/flexmonster/79keh0ee/ . It seems that
addCalculatedMeasure methods are working fine. The difference is that they were called from global
flexmonster object, when Flexmonster Pivot component is assigned to the local
pivot object. Therefore when you call these methods from
pivot object everything should be working fine.
Please let us know if you have any additional questions.
Hello Meir Hadassi,
Please have a look at the following video example – https://www.screencast.com/t/DwP4kEWdgQ .
Let us know if everything works fine for you.
We were able to add calculated measure by clicking on a button, and we can see that in arrange fields popup. How do we add calculated measure directly to the grid? without user going into arrange fields popup.
Thank you for pointing this out to us.
We would like to confirm that this is not the intended behavior.
Our team has added this request to our backlog and we will notify you as soon as we have any updates.
As a workaround, we kindly advise using the
setReport() API calls:
1) Get the current report:
var newReport = pivot.getReport();
2) Set the calculated value active:
newReport.slice.measures.active = true;
3) Set the new report:
Here is a JSFiddle example for illustration.
Please let us know if you have further questions and if this works fine for you.
We are looking forward to hearing from you.
Thanks a lot for you response. Yes it works great now.
one more question :)..
Is there a way to launch “Add calculation value” window directly from a button click?
we are trying to avoid multiple clicks to get to calculated values screen to improve usability.
Thank you for your reply.
We are glad to hear that the workaround works well for you.
Regarding launching “Add calculation value” window directly from a button click, we would like to mention that our developer team is working on a new API call for this purpose.
Please let us know if you have any further questions.