# Parâmetros

Hello everybody!

I need to perform a task, which I have to insert in a matrix, the name of the calculated field, however, there are 5 calculated fields, which will be analyzed by other axes in the matrix, for example:

Sales
Cost
Budget
Projection
QtdEmployees The values ​​would be displayed with the ifelse statement, like this:

Single value parameter: axisexample

Calculate Field: Axis_table

ifelse(
\${axisexample}=‘Sales’,‘Sales’,
\${axisexample}=‘Cost’,‘Cost’,
\${axisexample}=‘Budget’,‘Budget’,
\${axisexample}=‘Projection’,‘Projection’,
\${axisexample}=‘QtdEmployees’,‘QtdEmployees’,
‘NA’)

As I couldn’t relate calculated field values ​​to calculated field “Axis_table”, due to ‘aggregation’ and ‘non-aggregation’ error

Calculate Field: Axis_vlr
ifelse(
\${axisexample}=‘Sales’,{Vlr_Sales},
\${axisexample}=‘Cost’,{Vlr_Cost},
\${axisexample}=‘Budget’,{Vlr_Budget},
\${axisexample}=‘Projection’,{Vlr_Projection},
\${axisexample}=‘QtdEmployees’,{QtdEmployees},
0)

Can I create something like the print example, so as not to change the dataset structure, and link the values ​​according to their name?

Ps: sorry for the english, I’m still studying Instead of created the Axis_table field with an ifelse can you just say Axis_table = \${axisexample}

Then in your table the field group would be Country, Axis_table, your columns would be semester Year and your Value would be Axis_vlr.

Does that make sense / is that way you are looking for?

@Max, Thanks for the answer, however, when doing what you suggested, when I put the field in the matrix table, it only brings the default value created in the parameter, and to see the other values, I need to select in the control, example:

When creating the parameter “axisexample”, and marking a single value to relate in the calculated field, and the default value I insert “Sales”, even relating to an alternative dataset, where I insert the other values ​​(Cost, Budget, Projection, QtdEmployees ), I can only see a single value for “Country”: And to see the other values ​​of the field, I need to insert a control, and select the field. Oh, so you’re saying you want to see all?

Can you make a pivot table that has the semester year as rows. Then country and all your calculations as values.

The only thing that will be changes is that instead of having rows for your calculated fields they will be columns.

Like such.

If you want it how you have it in your original post then you will need to edit the SQL to create a separate row for each calculation.

1 Like

That’s exactly what I wanted, thank you very much for your help, I just had to move the calculations to a row in the pivot table, simple and effective, and I was complicating the situation lol
Thanks!!!