Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if else

Hi All,

I have 2 tables

Table A

Customer no ¦   Product Numbers

10                             222222

11                             33234234

12                             4232434

Table B

Customer no ¦   Name   ! Addresss

12                            A

13                            B

14                             C

I have joined these 2 tables. based on Customer number.

Here in Table B we do not have data for customer number 10 and 11. so for this I need to show as if customer number is 10 then 'not present'  and customer number is 11 then 'Old Customer'

I tried in expression few things.. didn't work..

11 Replies
PrashantSangle

Hi,

On what basis you are considering

Customer No 10 as 'Not Present' and

Customer No 11 as 'Old Customer'

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Max.

As few products are assigned to them via table A in the database. I would like to present them as such.

PrashantSangle

Hi,

Can you post your expected output w.r.t above inputs. So that it will be easy to suggest code.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sasiparupudi1
Master III
Master III

It is not clear from your explanation what text your want for customer

10   and customer  11... I am assuming that they both must show old customer as they both have a product number.

The customers who do not have any product number associated should be marked as 'Not Present'. Am I right?

Please explain

Sasi

Not applicable
Author

No

If you see Table A .. Shows Customer number and the product number

Table B Shows the Customer data in detail like name , address etc.

in the database they are independent tables. But in qlikview Iam joining these tables .iam getting the output as such

Output table

---------------------

Customer no             ¦    Name                     ¦ Address       ¦  Product Number

10                                     -                                       -                 222222

11                                     -                                       -                33234234

12                                    A                                      xx                  4232434

Iam looking output as below.

Output table

---------------------

Customer no             ¦    Name                     ¦ Address       ¦  Product Number

10                                Not Present                                       -      222222

11                                 Old Customer                        -                33234234

12                                    A                                      xx                  4232434

Not applicable
Author

is still there a  confusion?

sasiparupudi1
Master III
Master III

Yes

what makes

10   as                          Not Present 

and

11 as Old Customer

settu_periasamy
Master III
Master III

Hi,

how to identify the Old Customer and Not present? do you have any criteria or is that static?

if so,  try this..

TableA:

LOAD * INLINE [

    CustNo, Product

    10, 222222

    11, 33234234

    12, 4232434

];

Join

LOAD * INLINE [

    CustNo, Address

    12, A

    13, B

    14, C

];

NoConcatenate

Final:

Load CustNo,

  if(CustNo=10,'not present',

  if(CustNo=11,'Old Customer',Address)) as Address,Product Resident TableA;

  DROP Table TableA;

Not applicable
Author

Hi sasidhar,

Not present and Old customer is just an example name. I could keep any other..

As in the detailed customer table we do not have data for this. I want to specifically fill it with hard code names when displaying in the report.