Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

fredericvillemi
Contributor III

Use Alternative States to compare only time dimensions

Hello,

I have a simple report with a few dimensions : Year, Year/Month, Region, Country, Customer, Product

and two measures : cost and revenue

I would like to compare a total of Cost during any period and any previous period.

Which means, I want to let the users select exactly which period they want to see, and which exact period they want to compare to.

They can choose two months in the list and compare them with any two other months, not the previous ones for example.

To do that I have created a list box with Year and Year/Month in an Alternate State. The problem is I want to compare the default state to the Alternate state but for the Region, Country, Customer, Product already selected. I don't want to duplicate all dimensions in Alternate State.

If you understand well I want to compare :

Total Cost with filter from All dimensions from Default State 

to

Total Cost with Year and Year/Month filter  from Second Filter and all other Dimensions filter from Alternate State

Is it possible ? or is there another way to do it ?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Partner
Partner

Re: Use Alternative States to compare only time dimensions

Hello,

 

To achieve what you want to do, I suggest to have a formula like this for the second period (replace Alternate State by your Alternate State name):

Sum({$<[Year] = [Alternate State]::[Year], [Year/Month] = [Alternate State]::[Year/Month]>} [Revenue])

 

Hope this will help you.

Best regards,

 

Nicolas

View solution in original post

2 Replies
Partner
Partner

Re: Use Alternative States to compare only time dimensions

Hello,

 

To achieve what you want to do, I suggest to have a formula like this for the second period (replace Alternate State by your Alternate State name):

Sum({$<[Year] = [Alternate State]::[Year], [Year/Month] = [Alternate State]::[Year/Month]>} [Revenue])

 

Hope this will help you.

Best regards,

 

Nicolas

View solution in original post

fredericvillemi
Contributor III

Re: Use Alternative States to compare only time dimensions

Excellent ! Thank you