Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am having requirement as, my data is
Month, Start, End
01, 130, 100
02, 110, 120
03, 100, 100
04,90,100
05,100,110
06,100,140
at the time of calculating quarters I want output as
Quarter Start End
q1 130 100
q2 90 140
Here start value for quarter is value of starting month for respective quarter & same for end value
If you have 12 month you need to change
Pick(Month,'Q1','Q1','Q1','Q2','Q2','Q2') AS Q
to
Pick(Month,'Q1','Q1','Q1','Q2','Q2','Q2','Q3','Q3','Q3','Q4','Q4','Q4') AS Q
And if you have more then 12 month, you should add year into grouping and joining.
Do you have date in your data or month only?
You want to get the results in load script or in a chart?
In data I am having months and I want to calculate in script
See an attached example
Hi Thanks,
Its working but what if I am having whole 12 months data and if month data is not in order still it works?
If you have 12 month you need to change
Pick(Month,'Q1','Q1','Q1','Q2','Q2','Q2') AS Q
to
Pick(Month,'Q1','Q1','Q1','Q2','Q2','Q2','Q3','Q3','Q3','Q4','Q4','Q4') AS Q
And if you have more then 12 month, you should add year into grouping and joining.
Yes, Thanks I have tried for 12 month data as well as with random order of months still it's working
Thanks for the reply
Regards,
Vijeta