Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community!!
I´m trying to get two secuential balance sheet in pivot table report, so I´ve got my main structure and In expressions tab I´ve got two calculations:
The first one is calculated depending on year field and I use GetFieldSelections(YEAR)
The second one is calculated depending on year field minus one. I write GetFieldSelections(YEAR)-1, but it doesn´t work.
Any idea? Thanks for your response.
Fiber9906
I'm not sure what you're trying to achieve?
Are you trying to look at the SALDO for Customers which have a SALDO for the last year (Year-1) as well?
As you've already made a selection in AÑO you will not be able to get any data outside of that set. To get last years data you would do something like this using set analysis:
sum({$<AÑO={$(=AÑO-1)}>} SALDO)
If you instead want to show this years SALDO for those that has a SALDO last year you would instead want to use indirect set analysis using the p() function.
I just tested it in a text box and it seems to be working properly.
Could you post the whole expression?
The complete expresion is:
SUM
(IF(BALANCE='BSS' AND (GetFieldselections(AÑO)-1), SALDO, 0))
I tested too in text box and it works, but when I implemented on upper expresions it doesn´t show the correct values. I changed the arguments SALDO and 0, and it seems that works ok.
I´m surprised!! What do you think?
Fiber9906
I'm not sure what you're trying to achieve?
Are you trying to look at the SALDO for Customers which have a SALDO for the last year (Year-1) as well?
As you've already made a selection in AÑO you will not be able to get any data outside of that set. To get last years data you would do something like this using set analysis:
sum({$<AÑO={$(=AÑO-1)}>} SALDO)
If you instead want to show this years SALDO for those that has a SALDO last year you would instead want to use indirect set analysis using the p() function.
That´s exactly what I´m looking for. Thank you so much Jonas.
Fiber9906
You're welcome 🙂