Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I need some help to get the below requirement and the data is like below.
Input:
Part | OrderNo | OrderLineNo | CHARGETYPE | Cost |
---|---|---|---|---|
Samsung | 88733 | 1 | 498 | |
Melkco | 88733 | 2 | 3 | |
Other | 88733 | 9000 | 0 | |
88733 | 1 | SamsungDAC | -20 | |
88733 | Frakt | 5 |
Logic:
Based on the OrderNo and OrderLine No need to fill the blanks in Part field.So below sample output.
Part | OrderNo | OrderLineNo | CHARGETYPE | Cost |
---|---|---|---|---|
Samsung | 88733 | 1 | 498 | |
Melkco | 88733 | 2 | 3 | |
Other | 88733 | 9000 | 0 | |
Samsung | 88733 | 1 | SamsungDAC | -20 |
88733 | Frakt | 5 |
Final Out Put :
When am selecting the samsung value in Part field then i need to get the below output.
Note : Here no need to consider the Chargetype is blank.So only -20.
Part | Cost |
Samsung | -20 |
Note : I need to do this mainly in front end level only because of all the fields are coming multiple tables.So its very difficult to touch the data model.
Eagerly waiting for someone response to save my day 🙂
More Thanks,
Ajay
Thanks Kush.
I will check your suggested solution and get back.
Regards,
Ajay
Thanks Kush....But still getting the same problem.
I need to get -20 when am selecting the samsung value in field.
Regards,
Ajay
Hi Ajay,
Create calculated listbox and then select the value
or
you can select the Part value from New table itself which is created
Hi Kush,
Could you please share the app if its possible.
More Thanks,
Ajay
Hi Ajay,
I have already attached app on above comment
See attachment
Hi Kush,
Please check your application with selection of 'samsung' in part field ...Its giving 498 which is not correct.
I want to show -20.
I hope my requirement is clear.
Please see the attached
Thanks Kush..You saved some of my time.
Regards,
Ajay
Hi Ajay,
Handling this in script is better approach, Aggr() will have more performance issues if the data is huge that to you are using Calculated Dimension. Both it is not advisable to use.
Try to achieve this in script, it is the best solution.
Try below script
Data:
LOAD
AutoNumber(OrderNo & OrderLineNo) AS Key,
OrderNo,
OrderLineNo,
CHARGETYPE,
Cost
FROM
[https://community.qlik.com/thread/169557]
(html, codepage is 1252, embedded labels, table is @1);
Part:
LOAD DISTINCT
AutoNumber(OrderNo & OrderLineNo) AS Key,
Part
FROM
[https://community.qlik.com/thread/169557]
(html, codepage is 1252, embedded labels, table is @1)
WHERE Len(Trim(Part)) >0;