Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Tell us which business and trade publications you read most regularly: RESPOND NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

count Function based on 2 field

Hello to all,

I'm try to calculate how many piceses we change for a specific model, unfurtunally as is possible to see below in the picture in the "current situation" Qlik show me the number for both years with same value, how can I base the count function based on PartL3 column AND year?


model X on 2020 worked 30pcs for ParL3 X

model Y on 2021 worked 60pcs for PartL3 Y


below which formula I'm using for shoe the "current situation"

Count(TOTAL <PartL3> SerialL3)


below an example with more details 😉



1 Reply

Perhaps this way

You need to create 2 flag with

Load *, '2020' as Flag From Table;

Load *, '2021' as Flag From Table1;

Then, Simply create the measure in this way

Count(TOTAL <PartL3> {<Flag={2020}>} SerialL3) // For left table

Count(TOTAL <PartL3> {<Flag={2021}>} SerialL3) // For right table

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)