Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to perform the following on Qlikview:
on the data set I have a field 'class' that holds two outcomes 'legal' and 'not legal'
I want to sum the total amount when:
- in the previous month, the accountNumber's class was 'not legal'
- and current month, the accountNumber's class is 'legal'
meaning i want to sum total amount for only the accountNumbers that have transitioned from not legal (in the previous month) to legal (current month)
Your help will be highly appreciated.
Please don't clutter this site with duplicate discussions: Previous and Current Month data comparison
Try this expression if your month field contains numeric month values:
sum({<Month={"$(=max(Month))"},class={'legal'},accountNumber=P({<Month={"$(=max(Month)-1)"},class={'not legal'}>}accountNumber) >}amount)