6 Replies Latest reply: Mar 14, 2017 7:45 AM by Sunny Talwar

# Qlik sense -Q1 Variance % is Showing Blank

Hi Guru's,

Iam finding QoQ Variance % in Pivot Table.

iam able find the Variance % for Q2,Q3,Q4 ,Since there is no Previous Quarter for Q1 So its Showing Blank.

But i have a requirement that it should Consider Last Year Q4 As Previous Quarter.

Ex:if i Select 2017.it should Consider 2016 Q4 Minus  2017 Q1 Difference in 2017 Q1 QoQ variance

Please find the App and Excel File as Attached.

Dynamic Expression Would be the solution ,how to Write?

any help would be greatly appreciated.

Thanks,

Joshi

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

Is this what you are hoping to get?

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

Hi Sunny,

your solution working fine.but if there is no selections its showing blank QoQ variances for 2017 Q2,Q3,Q4.

if no selections ,its should show 2017 data.

where i need to Modify expression to achieve it.

Joshi

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

When there is no selection you want it to be defaulted as if 2017 is selected? Is that what you are looking for?

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

Hi Sunny,

if there was no Selections Q2,Q3,Q4 QoQ variance is showing Blank.

if nothing selected it should show all years data Combined and their total % and QoQ varaince baced on that.

Thanks for your work to solve almost my problem.

Thanks,

Joshi

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

I guess you can use an if statement to do this

If(GetSelectedCount(Year) = 0, YourOriginalExpression, NewExpression)

or

If(GetSelectedCount(Year) = 1, NewExpression, YourOriginalExpression)

• ###### Re: Qlik sense -Q1 Variance % is Showing Blank

Hi Joshi,

The best approach would be to assign a rank to each quarter in your 'LOAD SCRIPT'. Then you could use simple arithmetic to work it out.

If you have say 5 years of data and each year has 4 quarters. The oldest quarter be ranked 1, and the latest as 20.