Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
sebvz1989
Contributor II
Contributor II

Question

 

Good morning everyone. I need to perform an operation where I have to make comparisons between fields. The operation is as follows: count the records where my table1 is equal to or less than my table2 and my table3 is equal to or less than my table4. I don't know how to fix this. Please help.

 

sebvz1989_0-1619126586307.png

 

1 Reply
Dalton_Ruer
Employee
Employee

Your image and explanation aren't enough for anyone to try to help with your specific case. You would need to show example data of each table and example of expected output. 

In general - If Table1 and Table2 contain the same basic fields you could simply load them together for the dimensional values, and simply qualify the value fields like "Value_Table1" and "Value_Table2". After you have loaded both tables together like that you can do a simple SELF JOIN and create a flag that compares the values.

JOIN 

Load MyKeyField,

IF (Value_Table1 <= Value_Table2, 1, 0) as Table1_LessThanEqualFlag

Resident MyTableName

Then you can create an expression in a KPI that is a simple SUM of that flag:

Sum(Table1_LessThanEqualFlag)