Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
SK_2019
Contributor
Contributor

QOQ Volume Growth line Chart

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.

Tammie_K_0-1607360214369.png

 

Tammie_K_1-1607360214376.png

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!

@sunny_talwar 

 

Labels (1)
1 Solution

Accepted Solutions
SK_2019
Contributor
Contributor
Author

Found this solution in one of the old posts  which worked for me.

(Sum($(=vMetric)) - Above(Sum($(=vMetric))))/Above(Sum($(=vMetric)))

 

View solution in original post

1 Reply
SK_2019
Contributor
Contributor
Author

Found this solution in one of the old posts  which worked for me.

(Sum($(=vMetric)) - Above(Sum($(=vMetric))))/Above(Sum($(=vMetric)))