Hi, I am still learning Qlikview and am trying to make sense of the script that our developer created. When we have a Credit transaction, the dollar value is listed as a negative in reports I create (that part of our script is working), however if I want to calculate units it is counting the Credit as a positive number and throwing our total unit count off. I need the Flag below to count the credits as a negative, but still make them visible in a report showing the value as "-1", or whatever the true count would be. Right now, it shows all of our items in a transaction report as a unit of "1", even though there are several credits in the report.
Here is the section in my script that sets the Revenue Flag, with CR being the Credit:
you will need to generate the flag in the script as negative for the credit transaction and then you will have to use that flag in your reports as well. I hope you are already doing it in your reports. so you just need to modify your script to make the flag negative when the transaction type is CR. try using below code.
Thank you for your quick reply! I had tried that before and it still wasn't showing the transaction items as -1 in the report. I have edited the script again to the -1, and here is the expression I'm using to sum the units: