Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
EAK
Contributor
Contributor

Sumifs of different fields from different tables

Hi everyone. I am new to Qlik Sense. My concern is

I have table includes 1) Trial balance includes one fields  for codes as 100,101 etc (length 3)     2) other one as  1001,1010 (length 4)    3) Total of codes      (total 3 fields)

TB:

Code1;Code2;Total

100;1000;20

100;1001;30

101;1010;40

101;1011;50

When ı am preparing the table analysis, ı have some definition like as below

*Interest Income  should be sum of  100 (form Code 1)

*Interest Expense  should be sum of  1010 (form Code 2)

*Commission should be sum of  101 (form Code 1) 

Is there any way to differentiate  the formula for different lines of table?(like sumifs etc.)(expression)

Best Regards

 

10 Replies
marcus_sommer

I'm not sure if I understand your question right but you may try:

Sum({<[Code 1]={101}, [Code 2]={1010 }>} YourMeasure)

to apply an AND connection between both conditions and:

Sum({<[Code 1]={101}> + < [Code 2]={1010 }>}YourMeasure)

to apply it as OR connection.


Beside this I suggest to consider changes within the data-model which is then developed as star-scheme with a single fact-table in a stream-data-structure - means a single KPI field and a single Value field - with either all KPI's concatenated (yes, there would be multiple redundancies) or which is linked to The As-Of Table - Qlik Community - 1466130 which may result in an expression like: sum(Value) for everything.

This means the entire logic would be within the data-model and not within the UI. At first it may look like a lot of efforts but IMO it's much easier because each kind of logic must be understood and implemented anyway. Within the UI it's mostly complete manual and static work whereby in the data-model existing schemes could be used (yes, it might need some adjustments to the Qlik-logic) and be externally controlled and multiple versions (for different companies and/or countries and/or periods) could be just added and/or replaced.

- Marcus