
Contributor
2023-05-31
05:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculating PYTD YTD profits
Hello,
I am new to qlikview and i want to calculate the clean profits from the previous year to day versus year to day having the below data and their differences.
DATE |
VALUE |
DATE |
VALUE |
|
31/01/2022 |
100,00 € |
31/01/2023 |
150,00 € |
|
28/02/2022 |
101,00 € |
28/02/2023 |
150,00 € |
|
31/03/2022 |
102,00 € |
31/03/2023 |
90,00 € |
|
30/04/2022 |
103,00 € |
30/04/2023 |
80,00 € |
|
31/05/2022 |
104,00 € |
31/05/2023 |
20,00 € |
|
30/06/2022 |
105,00 € |
|||
30/07/2022 |
105,00 € |
|||
31/08/2022 |
107,00 € |
|||
30/09/2022 |
108,00 € |
|||
31/10/2022 |
109,00 € |
|||
30/11/2022 |
110,00 € |
|||
31/12/2022 |
111,00 € |
RESULT |
||
pytd |
ytd |
Diff% |
510,00 € |
490,00 € |
339 Views
1 Reply

MVP
2023-05-31
05:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Try like below,
Hope you have Year field
YTD =Sum({<Year={$(=Max(Year))}>}VALUE)
PYTD =Sum({<Year={$(=Max(Year)-1)}, Date={"<=$(=AddYears(Max(Date),-1))"}>}VALUE)
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
334 Views
