Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Join us on Feb.12 to Discover what’s possible with embedded analytics: REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
UMARTHI
Contributor
Contributor

KPI Count Value not the same as that in the Table

I have a table which looks like below:

item_id country group category type1 datenum createdate

idcount

1a India A C OK 1234 13/2/2024 1022
1b France B D OK 1236 15/2/2024 1212
1c Belgium A E KO 1235 14/2/2024 112
1d Jamaica B F OK 1226 05/2/2024 1124
1e Egypt A C OK 1227 06/2/2024 121
2a India B D OK 1250 19/2/2024 11

Connected to a calender table on datenum. week, month and year as key field. 

In the table above I get total as 2234 type1 = OK for week06. 

When I am doing a count of ids when type1 = OK for week06 I get 1 in the table but some other value in KPI when using set analysis: =Count({<type1={'OK'}, Week={06},Year ={2024},Country=,group=,Category=>}item_id) I am getting a different number like 1324. 

Can some one help me resolve this situation.

Labels (2)
1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @UMARTHI 

Given you are expecting a total 2,234, I presume you are thinking that the 13th and 14th Feb are in Week 6?

What I would suggest is that you add the dimension of Week to the table and check that the relationship between date and week is as you think.

If it is not, check the parameters of the Week function, with regard to first day of the week. There is also the setting in the SET statement at the start of the load script that can make a difference.

You could also try adding the KPI expression with the set analysis in it as a new measure in the table. This way you can see which rows the value for that expression appears against.

Hope that helps.

Steve

View solution in original post

1 Reply
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @UMARTHI 

Given you are expecting a total 2,234, I presume you are thinking that the 13th and 14th Feb are in Week 6?

What I would suggest is that you add the dimension of Week to the table and check that the relationship between date and week is as you think.

If it is not, check the parameters of the Week function, with regard to first day of the week. There is also the setting in the SET statement at the start of the load script that can make a difference.

You could also try adding the KPI expression with the set analysis in it as a new measure in the table. This way you can see which rows the value for that expression appears against.

Hope that helps.

Steve