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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Dimension level if else condition help

Hi Everyone,

I need some help to get the below requirement and the data is like below.

Input:

Part OrderNo OrderLineNo CHARGETYPE Cost
Samsung887331498
Melkco8873323
Other8873390000
887331SamsungDAC-20
88733Frakt5

Logic:

Based on the OrderNo and OrderLine No need to fill the blanks in Part field.So below sample output.

PartOrderNoOrderLineNoCHARGETYPECost
Samsung887331498
Melkco8873323
Other8873390000
Samsung887331SamsungDAC-20
88733Frakt5

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.

PartCost
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

19 Replies
ajaykumar1
Creator III
Creator III
Author

Thanks Kush.

I will check your suggested solution and get back.

Regards,

Ajay

ajaykumar1
Creator III
Creator III
Author

Thanks Kush....But still getting the same problem.

I need to get -20 when am selecting the samsung value in field.

Regards,

Ajay

Kushal_Chawda

Hi Ajay,

Create calculated listbox and then select the value

or

you can select the Part value from New table itself which is created

ajaykumar1
Creator III
Creator III
Author

Hi Kush,

Could you please share the app if its possible.

More Thanks,

Ajay

Kushal_Chawda

Hi Ajay,

I have already attached app on above comment

antoniotiman
Master III
Master III

See attachment

ajaykumar1
Creator III
Creator III
Author

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.

Kushal_Chawda

Please see the attached

ajaykumar1
Creator III
Creator III
Author

Thanks Kush..You saved some of my time.

Regards,

Ajay

jagan
Partner - Champion III
Partner - Champion III

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;