Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a pivot table with 2 periods and want to add Variance column to show difference between previous period vs current period.
I have created a set analysis formula like below, but I do not get the correct result.
=(Sum({<[ACCTG DATE (P0045)]={$(=max([ACCTG DATE (P0045)]))}>}[FUNCTIONAL AMT(YTD)])
- Sum({<[ACCTG DATE (P0045)]={$(=min([ACCTG DATE (P0045)]))}>}[FUNCTIONAL AMT(YTD)]))
The result I want is
Function | Function | Var | |
ACCTG DATE (P0045) | 20191231 | 20200131 | 20200131 vs 20191231 |
Status | 20,191,231 | 20,200,131 | 8,900 |
Totals | (19,510,795) | (19,304,099) | 206,696 |
Exist | (19,510,795) | (19,304,099) | 206,696 |
But I get an incorrect result like below. Hope I can get some guidance
Function | Function | Var | Var | |
ACCTG DATE (P0045) | 20191231 | 20200131 | 20191231 | 20200131 |
Status | 20,191,231 | 20,200,131 | 20,191,231 | 20,200,131 |
Exist | (19,510,795) | (19,304,099) | 19,510,795 | (19,304,099) |
Have you tried like:
Var = Column(1) - Column(2)
?
Thank you very much. When I use your suggested formula, the result becomes "-"
Function | Function | Var | Var | |
ACCTG DATE (P0045) | 20191231 | 20200131 | 20191231 | 20200131 |
Status | 20,191,231 | 20,200,131 | 20,191,231 | 20,200,131 |
Exist | (19,510,795) | (19,304,099) | - | - |
Could you share a sample app to check?
Sure thank you very much for your immediate help. Sorry I don't know how to attach the file here. Hope you would not mind to advice.
Click on the clip symbol on the left bottom corner of edit window.
I am really sorry for my inexperience. There is no Clip symbol in my screen.
This?
Thanks a lot for your patience. Somehow the Clip icon is not visible in my screen. I have to put my mouse around to find it. I have attached the qvf file here. The Pivot table is under YTD Variance (Based on SAL)
Thank you very much again
Since you have multiple members (dates) in column - you would get multiple outputs for an expression (and NOT one -unlike you want). To get one variance column, you have to modify your script I believe.