Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I reverse the sign on QlikView?
Hello everybody,
I've been using QlikView for about 4 weeks now and I'm getting it right
Nevertheless, I need your help ..
In my ERP system, the outgoing invoices are filled with transaction types. The formula itself works, however the occupancy type 'G' must be displayed as minus amount.
sum (
{<
Record Type = { 'R', 'G', 'O'},
Flag_Artikelfamilie_vorhanden = {1}
>}
rangesum (
#Sales,
-#Value
)
)
At the moment, QlikView adds all sales from the individual occupancy types, so far so good. Type 'G' must be subtracted.
Can you help me?
Many Thanks
If you're satisfied with the expression, don't change it. Instead, change the sign in the load script, something like:
if("Record Type"='G',-1,1)*Sales as Sales
Here's one option:
sum (
{<
Record Type = { 'R', 'G', 'O'},
Flag_Artikelfamilie_vorhanden = {1}
>}
rangesum (
#Sales * pick(match('R','G','O'),1,-1,1),
-#Value
)
)