Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Problem calculating net change month to month

Hi

Having problem with my expression trying to calculate net change month to mounth. I am getting null value on first and second row, first row I can understand but why the second row?

Skärmklipp.PNG

Total amout = Just calculates the number of ID's for a certain period/month.

count({<Period={">=$(=$(vYearMonth))"}>}DISTINCT ID)

Net change = the difference month to month, i.e. april= april - march, 19752-19820= -68

count({<Period={">=$(=$(vYearMonth))"}>}DISTINCT ID) - above(count({<Period={">=$(=$(vYearMonth))"}>}DISTINCT ID))

I am stuck and can't figure this out.

Any help appreciated

Thanks

5 Replies
Highlighted
Specialist II
Specialist II

Hi,

The Problem seems to be in  Variable Declaration 1701 is not taking the Above Value as 1612, where as 1702 for feb is taking 1701 as Above Properly.

Can you Check. Or share a sample app

Highlighted
MVP
MVP

would you be able to share the sample?

Highlighted
Creator
Creator

Hi

Thanks for your fast respons.

I have created a sample app that illustrates the problem: Test.qvw

Skärmklipp.PNG

Highlighted
MVP
MVP

try this

num(count({<Period={">=$(=$(vYearMonth))"}>}DISTINCT ID) - above(total count({<Period={">=$(=$(vYearMonth))"}>}DISTINCT ID)),'# ##0','.',' ')

Highlighted
Creator
Creator

Fantastic !!!

Using "total" solved the problem.

Thank you