I want to create a measure which will give me change in percentage of a specific column basis the week selected dynamically.
Now the catch here is, if the user selects any 4 weeks, I have to calculate the percentage change for the 4 weeks prior to it. If the user selects 5 weeks then i have to calculate the percentage change for 5 week prior to the selected 5 weeks.
EG: If I select week 21,22,23,24 then the change should be calculated taking into consideration 17,18,19,20 weeks. Lets say if its volume the filed would be set to sum of volume sales and percentage had to be calculated on that.
Hi @HariGanesan.
Please provide a small sample dataset and Excel mock-up of your desired results (using that sample dataset) to assist the forum members in their investigations.
Greg
So i want the percentage change in volume to be calculated dynamically based on user selected weeks.
We know mathematically change in volume is (new-old)/old.
So when the user selects one week the volume change must be calculated based on the previous week to the selected week and if the user selects two weeks the change must be calculated based on the previous two weeks prior to the selected weeks.
Ex: If the user selects week 4 and 5, the old value should be taken as a aggregate of the sum of volume of week 2 and 3. Since the user has selected 2 weeks and the min of those two weeks selected is 4 from that we want to take two weeks prior from 4.
If the user selects three weeks like week 4,5,6 then for the old the weeks should be selected as 1,2,3.
I am hoping the team and community here can help me achieve this.
Hello @HariGanesan Due to the length by which this post has been active, we are tagging it as Solved. Thanks to the contributors to this post. For further questions related to this post, please make a new thread. Feel free to reopen this thread if anyone would like to answer the pending inquiry above.