Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate QOQ Volume growth as a Line Chart.
I need to show Volume on left Y-axis (bar graph) and Volume Growth on right Y-axis( Line graph)
I have a data set with 3 yrs of data form 2018- 2020.
I am using time period variable (vTimePeriod1) in my QS app for R3M, R12M,All Years and a Metric Variable for Sales ,Units, Incentives, etc.
Quarter Field is calculated as 2020-Q1 using below expression
Year(date(floor(TIME_PERIOD),'MM/DD/YYYY')) &'-' & Q'&ceil(month(date(floor(TIME_PERIOD),'MM/DD/YYYY'))/3) as QUARTER
if Volume Growth =
Volume for Current Quarter (2020-Q4) – Volume for Last quarter (2020-Q3) _____________________________________________
Volume for Last quarter (2020-Q3)
The formula that I am considering to calculate Volume Growth doesn’t seem to work
=num (
(
Sum({<'$(=vTimePeriod1)' = {1}, [Time Period] =
{'>=$(=QuarterStart(date(addmonths(date('$(=vMaxDate)'),0))))<=$(=QuarterEnd(date(addmonths(date('$(=vMaxDate)'),0))))'}>} $(=vMetric))
-
Sum({<'$(=vTimePeriod1)' = {1}, [Time Period] =
{'>=$(=QuarterStart(date(addmonths(date('$(=vMaxDate)'),-3))))<=$(=QuarterEnd(date(addmonths(date('$(=vMaxDate)'),-3))))'}>} $(=vMetric))
)
/Sum({<'$(=vTimePeriod1)' = {1}, [Time Period] =
{'>=$(=QuarterStart(date(addmonths(date('$(=vMaxDate)'),-3))))<=$(=QuarterEnd(date(addmonths(date('$(=vMaxDate)'),-3))))'}>} $(=vMetric))
,'#.##%')
The expression is considering only for current and last quarter as I am using Max Date and resulting in a 0.0%.
I would like to know how I can replace the Max Date with a dynamic variable to calculate for all the Quarters selected.
How can I write the expression to calculate QOQ Volume Growth?
Let me know if you need sample data.
Your help is greatly appreciated.
Thank you!
Found this solution in one of the old posts which worked for me.
(Sum($(=vMetric)) - Above(Sum($(=vMetric))))/Above(Sum($(=vMetric)))
Found this solution in one of the old posts which worked for me.
(Sum($(=vMetric)) - Above(Sum($(=vMetric))))/Above(Sum($(=vMetric)))