# Parâmetros

**URL:** <https://community.amazonquick.com/t/parametros/7469>\
**Category:** Q&A\
**Tags:** parameters, calculations, analysis, quick-sight\
**Created:** [November 8, 2022, 7:58pm UTC](https://community.amazonquick.com/t/parametros/7469 "2022-11-08T19:58:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_3d](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@Jack\_3d](https://community.amazonquick.com/u/Jack_3d)\
**Post date:** [November 8, 2022, 7:58pm UTC](https://community.amazonquick.com/t/parametros/7469/1 "2022-11-08T19:58:30Z")

</div>

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

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/9/9a5f236054355a3dded5678a4e0256bda3622f8f.png)

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 😉

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [November 8, 2022, 11:16pm UTC](https://community.amazonquick.com/t/parametros/7469/2 "2022-11-08T23:16:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jack\_3d](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@Jack\_3d](https://community.amazonquick.com/u/Jack_3d)\
**Post date:** [November 9, 2022, 1:48pm UTC](https://community.amazonquick.com/t/parametros/7469/3 "2022-11-09T13:48:03Z")

</div>

@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”:

![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/c/c6d47d76c60bcc036f67ef3b867a468d259afb4b.png)

And to see the other values ​​of the field, I need to insert a control, and select the field.

☹

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [November 10, 2022, 10:07pm UTC](https://community.amazonquick.com/t/parametros/7469/4 "2022-11-10T22:07:24Z")

</div>

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.

 ![image](https://d1wl4jav5dp96l.cloudfront.net/original/2X/8/8c2fdb8cc85f5739fe9efa70ee22ae97d8051e02.png)

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.

---

<div class="post-metadata">

**Author:** ![Jack\_3d](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@Jack\_3d](https://community.amazonquick.com/u/Jack_3d)\
**Post date:** [November 18, 2022, 1:16pm UTC](https://community.amazonquick.com/t/parametros/7469/5 "2022-11-18T13:16:11Z")

</div>

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!!!
