Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the previous value in the Bar Chart?

Hi Guys,

I am working on a Bar Chart with two dimensions, one is material, the other is date.

MaterialDateInventory
M011st Jan40
M012nd Jan45
M013rd Jan48
M021st Jan60
M022nd Jan92
M023rd Jan70

I have created a Bar Chart based on this table and after the selection for material, the chart will be about date and inventory.

If i need to compare the value with its previous one, and mark the sharp change as another color, how can i fetch the previous value?

For example, for M01, 2nd Jan, i need to get 40 as it is the previous value for 45.

Could you please help?

Regards

1 Solution

Accepted Solutions
Not applicable
Author

Got it. I added a field using Previous() to create previous value in the script.

View solution in original post

1 Reply
Not applicable
Author

Got it. I added a field using Previous() to create previous value in the script.