Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
peschu123
Partner - Creator III
Partner - Creator III

How to show next process (descr.)

Hi

I have 2 tables Orders and suborders.

I have a straight table with orders as dimension and some expressions. And what I want to show is the description of the next suborder.

I think I have to create a field in the script in the Orders table, which saves this for me.

I don't find a way to show it in the table. I can show the max(ID_suborder) and the number of suborders to come. So i could calculate the ID_suborder for the next suborder. Something like =max(ID_suborder) - open_suborders + 1 ...

open_suborders = count(IF(Status=1,suborder))  ... just for the record.

But even with this number I'm not able to show the description.

I tried this IF(max(ID_suborder) - open_suborders + 1 = ID_suborder, Description,'No Orders')  ... Its not obvious for me why this don't works.

Do I have to code this into the script and generate an extra field? I can't believe that this can be so hard to show.

I think it should be the first ID_suborder with Status=1

Thank you for any hints..

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: FirstSortedValue({<Status={1}>}Description, SubOrderID)

See attached example.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
peschu123
Partner - Creator III
Partner - Creator III
Author

hmmm  nobody has a clue how to solve this?

My Table looks like

OrderOpen Sub-OrdersSub-Order TotalNext Open Sub-Order
1000012 ?
10001523?

Problem is the "Next Open Sub-Order" column I would like to show the Desc. of the next suborder.

Every sub-order has an ID and a status field which is unique within the order no, so I can calculate the sub-order ID like described above, but an IF Statement like "IF([sub-order ID] = Total - Open, Description, 'No Open Sub-Orders') does not work...

Is there any function which could do the trick?

tresesco
MVP
MVP

Hello,

Your question could be answered with a bit clearer explanation i believe. Though you have explained in your way, it has not reached most of the people like me. Can you please come up with your tables and sample data along with the expected result explained?

peschu123
Partner - Creator III
Partner - Creator III
Author

Hi tres qv,

i created a qvw with some sample data and a straight table. The fields/expression I need help with is marked red. The (not working) expression is quite simple (and i commented it in the properties/expression dialog).. I think it should make clear what I want to be shown in this field.

Thanks for your help.

Gysbert_Wassenaar

Try: FirstSortedValue({<Status={1}>}Description, SubOrderID)

See attached example.


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

PFA

peschu123
Partner - Creator III
Partner - Creator III
Author

Thank you for your help. It works great. I tested firstsortedvalue too, but obviously I did something wrong.

Gysbert you are a machine!

thank you guys for making my day...