Hello,
We were following the example provided in this post to group measures and non-measures together in a folder and noticed that we could extend the example to group non-measures/Calculated values together as well. For example, underneath the "Calculated values" folder in the fields popup, we were able to add a folder
attribute to each measure
object that corresponds to a calculation such that the Calculated values folder had subfolders, e.g., Calculated values/Folder A
and Calculated values/Folder B
.
However, when we call the getReport
api and observe the measures
attribute of the slice
object, we noticed that all of our folder customization do not appear in any of the measure
objects associated with calculated values. Is this the expected behavior?
We have provided a jsFiddle for convenience
All/Measure
folder as defined by the mapping
object.measure
object named My Calculation
with a folder attribute of Test
- in doing so, My Calculation
appears underneath Calculated values/Test
in the fields popupLog Measures
button, we observed that the the measures outputted to the console contains our calculated value measure object, but it does not contain the folder information.
flexmonster.setReport(flexmonster.getReport())
would cause our calculated value to appear outside of the Test
folder when we reopen the fields popup.Please let us know if there is something wrong with the jsFiddle or if we can provide any clarifications or additional information!
Kind regards,
Henry
Hi Henry,
Thank you for posting your question and providing a detailed explanation.
Since the workaround my colleague suggested earlier showcases a "hack" solution that is not a part of the component's functionality by design, it is not expected to work in the first place.
Naturally, this also means that we do not guarantee other issues or unexpected behavior won't emerge on top of this, which seems to be the case in your situation.
Please let us know if there is anything else we can help you with.
Best regards,
Mykhailo