Need a special offer?Find out if your project fits.

How to say that the total of a column will be the value of the column in one json A + the same column in another json B.

Rodrigo Rodrigues asked on February 6, 2024

json_a : {
  items: [
    january_a: 10,
    february_a: 15,
json_b : {
  items: [
    january_a: 20,
    february_a: 30,
| .... | january | february | ... |
             *30*       *45*
              10            15
              20            30


3 answers

Solomiia Andrusiv Solomiia Andrusiv Flexmonster February 7, 2024

Hello, Rodrigo!
Thank you for your question.
Kindly note that it is possible to show data from two JSONs into one pivot using Flexmoonster. We recommend trying the following approach:
1. If you are using the data property to connect Flexmonster to the JSON data, you can merge two arrays, e.g., data: [...json1,...json2].
If you are referring to a JSON file through a filename property, the data should be preprocessed and merged before being inserted into Flexmonster.
2. Create the following calculated value formula for your measures and put the individual flag to it:

measures: [
     uniqueName: 'januaryWithIssCalc',
     caption: 'Janeiro com ISS',
     format: 'RealFormat',
     formula: "abs(sum('januaryWithIss'))",
     individual: true,
   // More Months

With individual calculations enabled, the abs formula would be applied to each row of your data before calculating the sum of the rows.
We have prepared a JSFiddle example illustrating the suggested approach using the provided screenshot as a reference:
You can find more details about creating calculated values by the link:
Please let us know if the suggested approach would work for your case.
Kind regards,

Rodrigo Rodrigues February 7, 2024

Thank you again. I'm excited to share how flexmonster simplifies process development for financial reporting.


Solomiia Andrusiv Solomiia Andrusiv Flexmonster February 8, 2024

Hello, Rodrigo!

Thank you for your feedback.

We are happy to hear Flexmonster satisfies your needs☺️

You are welcome to reach out to us if any other questions arise.

Best regards,

Please login or Register to Submit Answer