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

If the value is null or 0, then Previous value based on condition in Qliksense

Hi QlikExperts/ @sunny_talwar  @Kushal_Chawda 

I need your help to achieve the below scenario. Tried different use case but not able to produce the expected output.

Data Format (Input)

abhijith28_0-1606805696000.png

Expected Output

abhijith28_1-1606805842153.png

 

There are more than 40000 unique ID's. But all 40000 ID's data are not shown, always single "ID" will be selected by default.

In the above Expected output For ID=1, value = '-' (null)  is replaced by 20 but not for Date=1/1/2020 as 1/1/2020 is the starting point and there are no values(>0) Prior to the date 1/1/2020.

For ID=2, (3/2/2020 and 4/2/2020) is replaced by 40.

If the input data for ID=3 in the below format, then the output would be same as input as there are no Value prior to null values.

abhijith28_0-1606807260439.png

 

Please help me on this scenario.

Thanks,

 

 

 
 
 

 

 

 

Labels (1)
12 Replies
abhijith28
Creator II
Creator II
Author

@PrashantSangle  @Kushal_Chawda 

Rule should be dynamic for ID, we cannot assign rules for some ID's.

Tried the below expression in the chart itself.

Can we use above and below function for comparison?

if( len(Value) = 0 and above(sum(Value))>0 and below(sum(Value))>0 , below(sum(Value)), sum(Value))

but its not returning the expected output.

Kushal_Chawda

@abhijith28  see the attached

 

abhijith28
Creator II
Creator II
Author

Thanks @Kushal_Chawda for your time and providing the solution😊