That's the closest I could get by using parameter to select a date from the "current" month, and then do the math in the calculated fields.
Hope it helps!
Your example has shown me something I should work around. there's something I don't really like... how can I change the filter for one with just a list of different months? (and I don't mean to create a list manually, because it would mean to insert lots of months)...
But all the rest is quite good! And i've also improved the example with an icon that shows if the diffrence between is good (green bullet) or bad (red bullet).
Could you elaborate a little bit on your idea about multiple months? If it is going to be a period of let's say 3 consecutive months, this could be done by selecting the start and end date. Tus you can get virtually any period as a startin point, if it is continuous. The question then is what are you going to compare with as "previous" period as I could see a coup of options there:
option 1) is it going to be the same number of months prior to your period (e.g. your period is 15 May - 14 Jul, and you compare it with 15 March - 14 May), or
option 2) the same number of complete months prior to your period (e.g. your period is 15 May - 14 Jul, and you compare it with 1 March - 30 April), or
option 3) you will be counting the days in the periodd (e.g. your period is 15 March - 14 May, and you compare it with 15 January - 15 March).
I believe if we grasp the concept well, your idea is fully achievable.
Great job Basheer!
It never occured to me to use table calc for this, although now I realize it is the most straightforward way to approach the poblem. I actually tried and simplified he table calc formula to be:
ZN(WINDOW_SUM(SUM([Sales (copy)]), -1, -1)), thus taking directly the sum of sales for the previous month, and making sure it is 0 if Null fo the first record. It still worked.