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

Why can't i compare these two ?

Hey can somenoe help me pls, because i don't understand why

Unbenannt.png

8 Replies
swuehl
MVP
MVP

Hard to tell. Could you post some sample data?

Are you maybe missing a space between the single quotes? Or do you want to concatenate in other order:

Vorname & ' ' & Nachname

?

Or does your 'name' field is maybe called 'Name' in fact (Qv is case sensitive)?

Or does 'name' field contain another character instead of a simple space as separator?

edit: In general, can't see anything wrong:

LOAD *,

  if(Nachname & ' ' & Vorname = name,1,0) as Flag;

LOAD * INLINE [

Nachname, Vorname, name

Hans, Fritz, Hans Fritz

];

Not applicable
Author

Hi Hans, I think that you lost a space between the name and the first name.

So, try this:

if(Nachname & ' ' & Vorname = name,1,0)


I hope that it help you,


Regards,


Agustín



Not applicable
Author

Hey swuehl, i forgot to say that the fields "vorname" and "nachname" come from another exel file than the field "name".

Is the Problem maybe that they don't see each other ?

Unbenannt.png

swuehl
MVP
MVP

That could indeed be an issue. How are the tables linked in your data model?

simenkg
Specialist
Specialist

try to put trim() around vorname and nachname to make sure that noe extra spaces are present.
if(Trim(Nachname)&' '&Trim(Vorname) = Trim(name), 1 , 0)
Not applicable
Author

I thought i can just compare them over these attributes(name=nachname&vorname), they aren't really linked to each other.

If i need to link them before i can compare them, how do i make that? 

swuehl
MVP
MVP

How does your data model look like? You link tables by a common field name. If you are unsure how to do this, I would suggest that you do the free Qlik training courses you can access here

New to QlikView

or maybe have a look at

Video Link : 3483

Not applicable
Author

Without seeing your data, if you have "nachname" and "vorname" in one (first) table, and "name" in another (second), you could create a compound key in your first table, such as

Trim(nachname)&' '&Trim(vorname) As NameKey

and alias your name field in the second table e.g.

Load

..

Name,

Name as NameKey,

...

*;

Your tables would then be joined by NameKey.