Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

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!

View solution in original post

3 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

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.

Anonymous
Not applicable
Author

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!

Anonymous
Not applicable
Author

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!