Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
can you please let me know how to compare string variables in qlikview UI. For example I have two variables A and B
with below values
A | B |
A1234 | A1234 |
A5678 | A5675 |
A8901 | A5432 |
I want to get distinct count after combining these values which is 5. Please help.
Thanks,
Hi,
Change your script like below
Data:
LOAD
*,
A & '|' & B AS Key
INLINE [
A, B
A1234, A1234
A5678, A5675
A8901, A5432];
SplitValues:
LOAD
Key,
SubField(Key, '|') AS CountField
RESIDENT Data;
Now use below expression to get distinct Count
=Count(DISTINCT CountField)
Hope it helps you.
Regards,
Jagan.
Hi Jagan Mohan,
Thanks for response I don't want logic in script, it needs to be in UI variables is based on complex condition and derived in UI. Please help. Thanks
Hi,
My suggestion is to do this in script, it is the best practice. If it is complicated then use below expression
=Count(DISTINCT A) + Count(DISTINCT B) - Count({<A=P(B)>} DISTINCT A)
Regards,
Jagan.