Forum Discussion
YearToDate transfornation into Monthly data
Hi all,
Short probably simple question. The data looks as following:
| Date | Customer | Volume | Cost |
| Jan-22 | X | 1 | 11 |
| Feb-22 | X | 2 | 12 |
| Mar-22 | X | 3 | 13 |
| Jan-22 | X | 4 | 14 |
| Jan-22 | X | 5 | 15 |
| Feb-22 | X | 6 | 16 |
| Mar-22 | X | 7 | 17 |
| Feb-22 | Z | 8 | 18 |
| Mar-22 | Z | 9 | 19 |
| Jan-22 | Z | 0 | 10 |
| Jan-22 | Z | 1 | 11 |
| Feb-22 | Z | 2 | 12 |
| Feb-22 | Z | 3 | 13 |
| Mar-22 | Z | 4 | 14 |
| Feb-22 | Z | 5 | 15 |
| Mar-22 | Z | 6 | 16 |
All Volumes and Cost are in YTD. My goal is to show simple graph with Cost/Volume per Customer but not YTD but for certain month. I have to take the data for Mar-22 and substract Feb-22 to see just Mar Cost and Volume. Then I want to divide Mar figures to see Cost/Volume. It has to be done for each customer, and all months in current year.
Thanks in advance for your support.
maati
2 Replies
- v-xiaotang
Community Support
Hi maati1980
Thanks for reaching out to us.
>> All Volumes and Cost are in YTD. My goal is to show simple graph with Cost/Volume per Customer but not YTD but for certain month
What is it doing the YTD calculation on? Why are there two sequences in it, {11,12,13,....,19},{10,11,12,...,16}, I don't quite understand how you got your current YTD data ?
As I understand it, you can do YTD calculations based on date, or YTD calculations based on date & customer. But in reality, you have X&Z in the first sequence and only Z in the second sequence, and there is a gap between the two sequences.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- maati1980Frequent Visitor
For customer Z for Jan the Volume should be 0+1, cost 10+11, cost/vol = 21
For customer Z for Feb YTD the Volume should be 8+2+3+5, cost 18+12+13+15, cost/vol= 3.22
My goal is to calculate for each customer Vol Feb (18)-Jan (1) = 17, Cost Feb (58)-Jan (21)= 37, then the Feb cost/col= 2.18
The data is random but mathematically it doesn't matter.
maati