Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've attached the qvw and data file.
I want to differentiate between months and want to get Rupees in Debit/Credit amount, but I'm getting wrong data.
Can anyone help me on this?
In Feb you have 25 rupees more than you had in Jan.
Logic maybe can vary depending in wich selector has Feb and wich one has Jan
That depends on how math is defined in your universe. In mine it's 0 minus -25 = 0 + 25 = 25. That's also how math is implemented in Qlikview.
In Jan we earned 17 Rupees
In Feb we spent -36 Rupees
so they left out credit balance is -19 right?
No Murali, in Jan you have a positive 17, in Feb you have a negative 36, that's a difference of 53, the symbol (positive or negative) will depend on the order of the operators, but the '53' will be kept.
Yes, the difference between -36 and 17 is -19: -36 + 17 = -19. If both numbers are credit amounts then the credit balance between the two is -19.
Perhaps this helps: Adding & subtracting negative numbers | Negative numbers |Khan Academy
Or maube you're asking about cummulative sums, not differences, in that case use:
Column(2)+column(1)
How to use cumulative here?
just Column(2)+column(1) ???
That will sum the value from the first column with the value in the second column.
Note that's not a difference, is an accumulation, ie:
Jan Feb TOTAL
10 15 25
-10 5 -5
thank you, I was so stupid today. lol
Glad to help.
Think twice about your final expression, if you're using alternate states and one is called 'comparemonth' maybe the intention should be to check the differences, not an accumulation (this can be done with only one state, no need of altern states).
Just quietly review your requirements and the answers in this thread to find the optimal solution.