6 Replies Latest reply: Sep 16, 2013 8:39 AM by Rodrigo Morales

# Expresion chart

Hi everyone, I have a problem, I want to make a chart with dimension=User and a calculated expresion, but I want to make a table with 2 options and when I click on one the chart show the results. I want this expresions in the same chart, but depends on where I click, the chart show "Pagos" or "Canje"

The expresions are:

=sum(if(EsCanje=0, amount)

=sum(if(EsCanje=1, amount)

The table must show "Pagos" and "Canje" (they are determined by the attribute "EsCanje", if EsCanje=0 --> Pago, if EsCanje=1 --> Canje).

How I have to do?

• ###### Re: Expresion chart

Not sure if I've  understood your requirement correctly.

You can create a variable and a button with an action to switch between two values.

Then use a chart with your two expressions, and set conditionals based on the variable value for both expressions.

Hope this helps,

Stefan

• ###### Re: Expresion chart

I want to make a table with two expresions: "Pagos" (if EsCanje=0) and "Canje" (if EsCanje=1), and when I click on one of this values, the chart change the expresion, but always with the same Dimension (Users).

The chart has one dimension and I want to select from a table of 2 values, and when I click the chart must show me the results for that value.

• ###### Re: Expresion chart

May be, you can try with ValueList()/ValueLoop().

• ###### Re: Expresion chart

Hi,

Go to Reports tab and check the Dimensions and measures list box.

• ###### Re: Expresion chart

You can create a button with action to select the field Escanje with the following action

Field select "Escanje"

= if (Escanje = 1,0,1).

=sum({<  Escanje= {0}>} Amount)

=sum({<  Escanje= {1}>} Amount)

• ###### Re: Expresion chart

I can do it. I maje a table with the value 'Tipo de Pago' like this:

if(EsCanje=0, 'Pagos', if(EsCanje=1, 'Canje')) as 'Tipos de Pago'

Then I use the expresion sum(amount) and when I click in a value of the table, the chart change