Hello, I am using pentaho report and I would like to make a graph with the results of a summation that is already done in the report. I would like to know how I can take those values. I imagine that we will have to make a numeric field to store the data.
Nombre Nivel Valor 1 Valor 2
----------------------------------------
NOmbre1 2 545 214
NOmbre2 3 23423 23423
NOmbre3 2 234 3434
NOmbre4 6 234 234
etc........
The question is: How could I take value1 and value 2 depending on the level? Something like... =IF([Nivel]=2)
To my Number1 field I assign Value1 and to my Number2 field I assign Value2
Take two values from the same row depending on the Level value
You can do it as you intend, you determine if "Level" has the value of 2 and you get the value of the columns in this case
[Valor 1]
and[Valor 2]
, in this case the ideal would be to use the SUM() function to obtain the sum of the values in both columns, otherwise you useNA()
to get a null.Example: