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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparitive Analysis using Alernate State

Hello QV users:

I would like to request your help on the attached QVW sample,

I am trying to compare combined May & Jun sales in 2014 ($100+200 = $300)

with individual Jan & Feb sales in 2015 $300 & $ 400

in the attached sample QVW I am looking to create a column like this:

res.bmp

I have created alternate states C & P for Current Year/Month & for Prior Year/Month respectively.

Any help would be greatly appreciated.

Kumar

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ok, I've added the missing records in the INLINE LOAD.

View solution in original post

6 Replies
swuehl
MVP
MVP

Kumar,

maybe like attached?

Not applicable
Author

Hello Swuehl;

Many thanks for your reply and for your time, your solution was good, but when I applied to my main model I had an issue since I forgot in my sample to add product as a dimension. Would it be possible to relook into the sample for a desired result like following

res2.bmp

swuehl
MVP
MVP

That's not trivial.

I do have a solution, but it fails for the Prd where you don't have any records in State C.

Prd B will just not show up.

I assume this is also the case in your real data, or do you have data for each Prd (could be zero value)?

Not applicable
Author

Hello Swuehl;

The data structure for actual purpose has values in both the states P & C , my example was again bad,

there will not be a case like Prd B

Sorry for the inconvenience,

Kumar

swuehl
MVP
MVP

Ok, I've added the missing records in the INLINE LOAD.

Not applicable
Author

thanks very much Swuhel, appreciate the help