Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I'm making a sales report in Qlik Sense, and we need to display our clients' rewards as negative values so they can be subtracted from the value of their invoices. The problem is that in our database, the value of the rewards are displayed as positive numbers.
For example:
The value highlighted in yellow needs to be negative, for the sum of those sales to be 200,641.61 instead of 201,039.89, as it is displayed in the first value of the table.
Any ideas??
Hi @lidiacuna ,you can do something like this:
In Script :
Load
field1,
field2,
Concepto,
if(Concepto = 'BONIFICACION', Monto*-1, Monto) as Monto
FROM YourSource;
In Expression :
sum(if(Concepto = 'BONIFICACION', Monto*-1, Monto))
Avísame si es una solución a tu pregunta!
Hi @lidiacuna ,you can do something like this:
In Script :
Load
field1,
field2,
Concepto,
if(Concepto = 'BONIFICACION', Monto*-1, Monto) as Monto
FROM YourSource;
In Expression :
sum(if(Concepto = 'BONIFICACION', Monto*-1, Monto))
Avísame si es una solución a tu pregunta!
Sí! funcionó perfectamente. Muchas gracias, Fabián 🙂