Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qw_jakub
Partner - Contributor III
Partner - Contributor III

Sum of two expressions; source tables as dimension

Hello,

I need to make a sum of two counts. For example count(System1_id) + count(System2_id) .

This expression works fine. But is there a way to use the source system(table)  as a dimnesion?

For example:

Total  (count(System1_id) + count(System2_id) )  : 1500

System1 (~ count (System1_id)) : 800

System2 (~ count (System2_id)) : 700

 

Other than in this chart the systems (tables) are completely unrelated. I am trying to avoid concatenation, as this would make me do a lot of changes.

Thanks for any tips.

1 Reply
swuehl
MVP
MVP

Maybe like this:

Use a synthetic dimension using valuelist:

=valuelist('System1','System2')

then as expression

=pick(match(valuelist('System1','System2'), 'System1','System2')

,count(System1_id)

,count(System2_id)

)

and use sum of rows as total mode (in your straight table, forgot to say).