Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expressions if FieldA = FieldB

Hi everyone

Is it possible to use an expression to match a field
For example
Count({<fieldA=FieldB>}value)

The reason I ask is that I want a count to reference the same dimension but the tables aren’t / can’t be joined without causing an issue with loops
I would like this formula to sit in the same table as others
Labels (2)
1 Solution

Accepted Solutions
lblumenfeld
Partner Ambassador
Partner Ambassador

I'm still a bit unclear about what your data looks like. Is this part of the original question? If it is then you are able to mix set analysis with what I posted, so 

Count(<{obj_type_code={‘CHB’,’BBF’},app_gc=P(app_gc1)> distinct  If(FieldA = FieldB, inv_no ))

Is a valid statement. Is there data you can post to explain further?

View solution in original post

4 Replies
lblumenfeld
Partner Ambassador
Partner Ambassador

The simplest way to do this is 

Count( If(FieldA = FieldB, Value))

You can also use set analysis, but this works and is simpler.

Anonymous
Not applicable
Author

Thanks for the quick reply - unfortunately I have some additional set analysis and it doesn’t seem to be compatible...
I just tried
Count(<{obj_type_code={‘CHB’,’BBF’},app_gc=P(app_gc1)>}DISTINCT(inv_no))

The app_gc has breakdown information in it and
The app_gc1 , obj_type_code and inv_no are in a separate table and have static product holdings
I can’t link them without losing info from the holdings

lblumenfeld
Partner Ambassador
Partner Ambassador

I'm still a bit unclear about what your data looks like. Is this part of the original question? If it is then you are able to mix set analysis with what I posted, so 

Count(<{obj_type_code={‘CHB’,’BBF’},app_gc=P(app_gc1)> distinct  If(FieldA = FieldB, inv_no ))

Is a valid statement. Is there data you can post to explain further?

Anonymous
Not applicable
Author

I think you have done it thank you - I think the problem I have is that the volume of data I have is causing the program to give me the white screen of death !! 😂

I knocked up an example to share

Count({<obj_type_code={'CHB','BBF'}>}Distinct IF( gcn = gcn1, inv_code))

This has allowed to non linked tables with similar to sit within the same report
Note: I couldn’t link the tables due to filtering inconsistencies on the breakdowns table
Example =
Table1 is the Customer Holdings
Table 2 is the breakdowns

Simplified 👍