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: 
Not applicable

Assing value to an empty field in load script

Hi there,

hopefully someone can help me.

My data is looking basically like in table below. There is an order number, a couple of machines for each order number (I was not very creative in thinking of good machine name ) and of of the machines is considered to be the leading machine of the production line.

Order_Nr
MachineLeadingCustomer_Requests
324654/TL01PurpleX2
324654/TL01Blue4
324654/TL01Orange3
394562/TL01BlackX5
394562/TL01Grey1
394562/TL01Yellow0
315649/TL01BrownX2
315649/TL01Green5
315649/TL01Red1

What I need to display in my application is a table that shows following information (filled with examples):

Order_NrLeading MachineTotal Customer_RequestFA_DateSales_Rep
324654/TL01Purple915.04.2012John Doe
394562/TL01Black601.02.2013Jack Frost

Basically I just want to count the amount of Customer_Request for each order and show the leading machine. But how can I achieve the latter? If I just display the row containing the leading machine I only the that specific amount of customer requests. Do I need to create a new column in my load script containing the leading machine for each order_nr? If so, how can I do that?

What might be important is that my data is sorted in my .qvd-file with a so called "equipment number" and not by the Order_nr. Thus the order numbers are not sorted as shown in the first table but are scattered all around the qvd.

Thanks a lot and best regards,

Max

1 Solution

Accepted Solutions
Gysbert_Wassenaar

It's not necessary to create a field in the script. You can use a chart expression to get the leading machine: only({<Leading={'X'}>}Machine)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

It's not necessary to create a field in the script. You can use a chart expression to get the leading machine: only({<Leading={'X'}>}Machine)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

it is really that easy - I should get used to set analysis.

Thank you!