Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show previous value in table line item

Good Afternoon, all!

I have a straight table for data quality analysis that shows me any suspect values from my source data. In the following example, any field1 value that is negative indicates suspect data. Subsequently, I have a table in qlikview that shows me all such values.

The dimensions of the table are:


Serial Number


=Sum({$<field1={"<$(=0)"}>} field1) -- to only show the suspect values

=Sum({$<field1={"<$(=0)"}>} field2) -- to show the source value (value2 is used in the script to derive value1)

I'm wanting an additional expression to see what the value for field2 was in the previous month, so I assume I need a function similar to the following

=Sum({$<field1={"<$(=0)"}, Date = {"$(=addmonths(Date), -1)"}>} field2)

however this just resolves to '0' on every line item.

Any suggestions on how I can show the previous month's value for the same dimensions, relative to the specific date of the suspect data?


4 Replies

You would need to use Above/Below function (based on sorting of your straight table) to do this.



May be using Month field like:

=Sum({$<field1={'<0'}, Month= {"$(=Month(addmonths(Max(Date), -1))"}>} field2)

Not applicable

Thanks for your suggestions, but unfortunately none of these answers were appropriate. I decided in the end to add the expression value in the load script using the Lookup() function.

Thanks again!