Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanu_today
Creator
Creator

If Logic problem

Hi everyone,

I need some help in the below script and attached the data and application as well.

In CASA+FD table the PRODUCT CA (second row) is not satisfing the CASA LOGIC.

WildMatch(PRODUCT_CODE,'200','201','202','203','204')

              or WILDMATCH(PROMO_CODE,'300','301','302','303','304')

              or WILDMATCH(TYPE,'Associate') AND WILDMATCH(PRODUCT,'CA','SA') ;

The above script is working fine in CASA field but giving some wrong value in CASA+FD.(Here we will get the list of CUST_IDS

under the PRODUCT FD with TYPE not equal to 'ASSOCIATE'.

(Purpose is to get the list of CUSTID'S which are having FD product with TYPE not equal to 'ASSOCIATE')

Thanks in advance,

Dhanu

1 Solution

Accepted Solutions
nilesh_gangurde
Partner - Specialist
Partner - Specialist

12 Replies
santharubban
Creator III
Creator III

hi,

Use this  expression in the CASA+FD table

only({<PRODUCT = {'FD'},TYPE -={'Associate'}>} CUST_ID)

i think it will help you.

dhanu_today
Creator
Creator
Author

Thanks Ks..But its not working as per above.It is giving only FD custids'

Dhanu

dhanu_today
Creator
Creator
Author

Any hint from any one !!

Thanks

Dhanu

santharubban
Creator III
Creator III

you have mentioned

(Purpose is to get the list of CUSTID'S which are having FD product with TYPE not equal to 'ASSOCIATE')

you  need only FD product except 'ASSOCIATE' right.

dhanu_today
Creator
Creator
Author

Yes that is right....that mentined condition + casa logic also.

In short, whatever the custid's am getting for the ids i have to get the fd relation with except type 'associate'

Please check once the application.

Thanks,

dhanu

Not applicable

Hey Dhanu,

I am not sure why you are creating another table in your script. You can just create flags in the original table itself for whatever condition thats required.

Check out the attached and see if it helps. I created two flags on the backend. If condition is met it will be 1 else 0.

Thanks

AJ

dhanu_today
Creator
Creator
Author

Thanks Aj...The first 2 logics you have mentioned that are working fine in earlier also.

But the problem at 3 logic level.Let me explain in detail.

The CASA CUSTID'S(as per first logic) may have the product FD also.(which are not equal to TYPE ASSOCIATE).

Wrong record is below. which is not coming in CASA(Logic1) thats correct..But it is coming in CASA+FD.its wrong.

8011606456DeliverCA

I have to get those custids in script level to do the some further calculations in front end like Count(CASA),count(FD) and Count(CASA+FD).

Let me know if in case of any clarificatin

Thanks,

Dhanu

dhanu_today
Creator
Creator
Author

Any hint from any one or any alternate method to get the mentioned above req.

Thanks,

Dhanu

Not applicable

But if you look at the FD_Flag in my qvw file for

8011606456DeliverCA

it will be 0 which means it doesn't satisfy the condition. So on you front end calculations you can use set analysis like

Count({<FD_Flag = {1} >} Cust_ID)

Then the above record won't even be considered in the calculation.

Does that make sense?

Thanks

AJ