Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
rakeshkumar1890
Creator
Creator

Logical Condition in Script

Hello everyone,

Need your help to find out this logical condition on script.

Perference:

  • First Preference on Category : Supply Issue
  • Second Preference on Category : forecast
  • Third Preference on Category : Others categories

Check 1 :Per OrderLine, check category with given preference. 

Check 2 :Per OrderLine, check category with given preference. If same category more than 1 then check into OrderNo counts. Maximum no. of counts should be output

We have the raw data like below:

OrderLinePartsCategoryOrderNo
CET0578P19forecast100
CET0578P05Supply Issue304
NIM0578P24forecast304
NIM0578P24invalid reason code246
NIM0578P24supplier issue304
PCT0020P07forecast370
PCT0020P92forecast370
PCT0020P72forecast938
PCT0020P30invalid reason code564
PCT0020P63invalid reason code938
PCT0020P14supplier issue564
PCT0020P41supplier issue938
PCT0020P10Supply Issue290
PCT0020P90Supply Issue290
PCT0020P56Supply Issue564
PCT0950P02forecast200
PCT0950P06forecast370
PCT0950P05forecast938
PCT0950P04invalid reason code938
PCT0389P22Daily370
PCT0389P31Maintenance938
PCT0389P19NA938

 

Output result:

OrderLinePartsCategoryOrderNoRemark
CET0578P05Supply Issue304Result was came due to first preference category - Supply Issue
NIM0578P24forecast304Result was came due to second preference category - forecast
PCT0020P56Supply Issue564Result was came due to more than 1 Supply Issue on each orderline PCT0020,  then I checked to Order No. 564 more than others ( I checked only "Supply Issue" not to forecast because Supply Issue is first preference
PCT0950P05forecast938Result was came due to more than 1 forecast on each orderline PCT0950,  then I checked to Order No. 564 more than others in forecast.
PCT0389P19NA938Result was came due to third preference --  Checked Supply Issue or Forecast are there or not, If not then nothing to check.
PCT0389P31Maintenance938 
PCT0389P22Daily370 

 

Thanks in advance to everyone for your input. I am waiting for the output result.

Please feel to reply if any doubts.

Kind Regards

Labels (3)
0 Replies