Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I do have a requirement where I need to show current price, previous day price, min price (10 day ), max price (10 Day).
please see sample data
Prodcut Id | BusinessDate | Price |
ABC1234 | 2015-06-19 | 81 |
ABC1234 | 2015-06-18 | 82 |
ABC1234 | 2015-06-17 | 83 |
ABC1234 | 2015-06-16 | 78 |
ABC1234 | 2015-06-15 | 74 |
ABC1234 | 2015-06-12 | 75 |
ABC1234 | 2015-06-11 | 89 |
ABC1234 | 2015-06-10 | 91 |
ABC1234 | 2015-06-09 | 88 |
ABC1234 | 2015-06-08 | 73 |
ABC1234 | 2015-06-07 | 72 |
ABC1234 | 2015-06-06 | 69 |
ABC1234 | 2015-06-05 | 71 |
ABC1234 | 2015-06-04 | 88 |
ABC1234 | 2015-06-03 | 81 |
ABC1234 | 2015-06-02 | 89 |
so, if select June 19 o/p table should look
Product Id | Current Price | Previous Day Price | Min Price (10 Days) | max Price (10 Days) |
ABC1234 | 81 | 82 | 73 | 91 |
so, if select June 18 o/p table should look
Product Id | Current Price | Previous Day Price | Min Price (10 Days) | max Price (10 Days) |
ABC1234 | 82 | 83 | 72 | 91 |
please help
PFA.
Best,
Sunny
only({$ <BusinessDate={"$(=date(max(BusinessDate)-1))"}>} Price)
min({$ <BusinessDate={">=$(=date(max(BusinessDate)-11))<=$(=date(max(BusinessDate)))"}>} Price)
max({$ <BusinessDate={">=$(=date(max(BusinessDate)-11))<=$(=date(max(BusinessDate)))"}>} Price)
Please find attached
Thx Massimo I think this formula is working, but can you let me know how to exlcude weekends in the range. Thanks for the help.
Hi Sunindia,
can you let me know the logic how this formula works, when I try to implement I'm getting blank values.
Thx for help