Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
jacobluft
New Contributor III

Trouble with getting Difference in data over Time.

Hi everybody, I have a problem where I am trying to create a Chart that shows Total Seat Count, Expired Seat Count, and the New Seat Count from month to month. My data has a Space Status Column, a Seat Count and a Date column that I am pulling data from. I have the first 2 inserted into my table but when I try and insert New I run into trouble.

I have defined 2 variables,

Let vMaxMonth = Max(Month);           (Where Month is defined in the table load by "Month(Date) as Month")

Let vPreviousMonth = Max(Month-1)

My Expression for 'New' then becomes:

Sum({$<Month={$(#vMaxMonth)}>}[Seat Count]) - Sum({$<[Month]={$(#vPreviousMonth)>}[Seat Count])

This is returning all 0's when present in the table, even though there is a monthly change in Seat Count.

Any help is welcome!

Thanks.

1 Solution

Accepted Solutions
Highlighted
jacobluft
New Contributor III

Re: Trouble with getting Difference in data over Time.

Considering my data was in a table I found that Inter-Record Functions solved my problem. Hope this information helps anybody in a similar situation!

3 Replies
Partner
Partner

Re: Trouble with getting Difference in data over Time.

Hi Jacob,

Problem is, that by doing:

Let vMaxMonth = Max(Month);


There's no value with this and everything else that depends on it will be Null or 0.


Try something like the attached file.


felipe.

jacobluft
New Contributor III

Re: Trouble with getting Difference in data over Time.

Hello,

Because I am on a Personal edition of QlikView I cannot open that file as it wasn't created by me. If there another way you can show your solution, such as screenshots, that would be greatly appreciated!

Can you briefly explain why vMaxMonth=Max(Month) does no have a value?

Thank you very much for you time!

Highlighted
jacobluft
New Contributor III

Re: Trouble with getting Difference in data over Time.

Considering my data was in a table I found that Inter-Record Functions solved my problem. Hope this information helps anybody in a similar situation!