Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Paknanarn23
Creator II
Creator II

Take time to delete

I want to subtract the Start Time of the next WO from the null WO with the Start Time of the previous WO, what should I do?

Paknanarn23_0-1688545247662.png

 

6 Replies
udit_k
Partner - Creator II
Partner - Creator II

using below function and using offset parameter we could achieve this :-

Below - chart function | Qlik Sense on Windows Help

 

Paknanarn23
Creator II
Creator II
Author

I tried this but it doesn't value my condition. I want a value where, if Value = 0, take the start Time of the WO next to the WO that is equal to 0, subtract the previous value greater than 0.

udit_k
Partner - Creator II
Partner - Creator II

Start time could be valuate using above function .

if(isnull(StartTime),below(StartTime,0,1),StartTime)

To subtract value with next to previous one , we need to have both above and below records of the row where value is 0.

if (isnull(sum(NbSales)),Rangesum( Above(Sum( NbSales),0, 1))-Rangesum( below(Sum( NbSales),0, 1)),sum(NbSales))

Paknanarn23
Creator II
Creator II
Author

I made an example for you to look at in excel. in what I want

Paknanarn23_0-1688549916592.png

 

udit_k
Partner - Creator II
Partner - Creator II

This should work :-

if (isnull(StartTime),( below(StartTime,0, 1))-( Above(StartTime,0, 1)),StartTime)

Paknanarn23
Creator II
Creator II
Author

Thank you for trying to help me. But when I use this code The results are not as desired.