Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Logic help needed

I have below data set.

 

IDSubIDActual
11100
12200
13250
22300
23400
33500
34600

Output needed (I want to calculate it in front end only)

 

IDValue
10
2200
3

400

Logic: For ID 2, I want to see previous ID & subid should be equal to current id

          example, For ID 2, I will see the previous ID 1 and Pick subid =2 value

20 Replies
vinieme12
Champion III
Champion III

You can still use the Original solution which stalwar1‌ provided

Use Autonumber on your ID and SubID fields this will create number ID fields that you had originally provided and proceed with Sunny's solution

LOAD  *,AutoNumber(ID) as IDKey,AutoNumber(SubID) as SubIDKEY INLINE [

ID,SubID,Actual

AB12CD,AB12CD,100

AB12CD,TD123C,200

AB12CD,PC12KT,250

TD123C,TD123C,300

TD123C,PC12KT,400

PC12KT,PC12KT,500

PC12KT,KC123T,600

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.