Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
lukeert19
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?

example

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 😉

lukeert19_1-1612522015075.png

 

1 Reply
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful