Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, this title could be misleading, so I'll try to make it quite clear. I have a Simple Table With One dimension a several expressions. One of those is "RAPPEL" which formula is the following
/// A
IF(Gestion.CodigoCliente='CNA008020',Sum(TOTAL {<CalendarDate={'<=$(=Date(vFFG)) >=$(=Date(vFIG))'} , OutGestionTotal.NCuenta={7090002} >}
OutGestionTotal.ImporteCompra),
// B
IF(Gestion.CodigoCliente='CNA008007',Sum(TOTAL {<CalendarDate={'<=$(=Date(vFFG)) >=$(=Date(vFIG))'} , OutGestionTotal.NCuenta={7090003} >}
OutGestionTotal.ImporteCompra),
// C
IF(Gestion.CodigoCliente='CNA008008' ,Sum(TOTAL {<CalendarDate={'<=$(=Date(vFFG)) >=$(=Date(vFIG))'} , OutGestionTotal.NCuenta={7090004} >}
OutGestionTotal.ImporteCompra),0)))
When the only filter applied this a date range ( let's say last month) I get these data:
But when I choose one of those Customer (i.e CNA008020 with 5474.80 €) the table changes this way
Why does it change? Note that the value Kilos remains the same.
Thank you all!!
That's because of the TOTAL qualifier you use:
If the word total occurs before an expression, the calculation will be made over all possible values given the current selections, but disregarding the chart dimensions.
The first table is basically showing OutGestionTotal.NCuenta={7090002}
for the given dates.
The second table is showing these same results but then for CNA008020 (Your selection, that was first disregarded as dimension)
Hi StigchelI, I understand but the Table [OUTGESTIONCOMPRA] is different, external to the table [GESTION], they are not linked, so what I try do with the formula
IF(Gestion.CodigoCliente='CNA008020',Sum(TOTAL {<CalendarDate={'<=$(=Date(vFFG)) >=$(=Date(vFIG))'} , OutGestionTotal.NCuenta={7090002} >}
.....
OutGestionTotal.ImporteCompra),
is to sum all the values of the field [OutGestionTotal.ImporteCompra] and just show them in the row of the customer 'CNA008020'. The Sum shouldn't change because it not depends on the value of the dimension [Gestion.CodigoCliente]. It only depends on the date range (CalendarDate) and the value of the field [OutGestionTotal.NCuenta] in this case '7090002'.
At least is what I think.
Thanks for yor time
Without knowing which tabels/ fields are linked or not, and what is in the variables, it is not possible to say what the problem is.
Given the info I have, I can only guess that selecting the customer CNA008020 is altering the date range evaluated.