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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
joshibabu_are
Contributor
Contributor

QOQ variance Calculation for First Quarter

Hi All,

I want to show      QoQ Varaiance.

Expression For 2017 Q1 Variance:

(Q4 Amount -Q1 Amount )/Q1*100

Same Logic For All Quarters .

I want dynamic Expression to achieve this .

please find the attached screen shot and data file and Qvf file

Result for 2017 Q1 should be: -20%


Any Help would be greatly appreciated.


stalwar1

Thanks,

Joshi

Labels (1)
13 Replies
sunny_talwar
MVP
MVP

When you say max year, do you mean the same data that we see when 2017 is selected or data when nothing is selected?

sunny_talwar
MVP
MVP

Try this:

Aggr(Above(Sum({<Year, Quarter, YearQuarter>}Amount))/Sum({<Year = {"$(=Max(Year))"}>}Amount)-1, Division, (YearQuarter, (Text)))

joshibabu_are
Contributor
Contributor
Author

Hi Sunny,

Thanks for your Help.its working Perfect.

but small change in requirement.

how to change your expression for below case

2017 Q1 Amount-2016 Q4 Amount/2016 Q4 Amount.


Thanks,

joshi

sunny_talwar
MVP
MVP

This should do it

Aggr(Sum({<Year = {"$(=Max(Year))"}>}Amount)/Above(Sum({<Year, Quarter, YearQuarter>}Amount))-1, Division, (YearQuarter, (Text)))