Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to create variance from 2 month total customers?

I have 3 fields -

1) type of account A,B,C

2) total customers

3) month id - 201206 and 201112

I would like to create variance by total customers by type of account for the 2 month id.

I am using create expression to create

1) Current month total customers -

 

sum

({date={'2012-06'},[Mth Id]}[total Cust])

2) previous month total customers

sum({<date={"$(=Date(AddMonths(date,-6),'YYYY-MM'))"},[Mth_Id]=>}[Total Cust])

3) variance

[current month total customers] - [previous month total customers]

But the above does not work. Anyone can help?

2 Replies
Not applicable

Re: How to create variance from 2 month total customers?

Hi,

What is the logic to select the two months? I mean would you always need Variance between those two months?

Regards

R

Not applicable

Re: How to create variance from 2 month total customers?

check your syntax, it should be:

1) Current month total customers

 

sum({$<date={'2012-06'},[Mth Id]=>}[total Cust])

2) previous month total customers

sum({$<date={"$(=Date(AddMonths(date,-6),'YYYY-MM'))"},[Mth_Id]=>}[Total Cust])


3) variance

[current month total customers] - [previous month total customers]

Community Browser