Discussion Board for collaboration related to QlikView App Development.
I need to substract two values of 'Volume' within the following table depending on 'Date' but have no clue how to do that
The logic should be: 'Volume' of maxString(Date,1) - 'Volume' of maxSting(Date,2) [here 20'000-10'000]Date Volume30.06.2009 5'00001.07.2009 10'00003.07.2009 20'000
Has anybody an idea how to do that?
Here is your application.
Data for date in your application is interpreted as string earlier. Because that max was not working.
Here you go. Working version of yours.
View solution in original post
Below expression will do job for you.
=sum(if(max(total Date) = Date,Volume)) - sum(if(max(total Date,2) = Date,Volume))
check the attachment. It's gives zero. Two expressions gives the same result
sum(if(max(total Date) = Date,Volume)) = 20000
sum(if(max(total Date,2) = Date,Volume)) = 20000
Check this attached app.
I have used this for test the that code.