Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kash04kk
Contributor II
Contributor II

Similar function to "CountIf" of Excel

Hello everyone,

Please find below the screenshot of an excel file example:

excel file example.jpg

Column B is the ID, Column C is the count of ID (calculated as "=countif(B:B,B3)")  and Column D is the weights (calculated as "1/Column C).

When i load ID in the qlikview, it only shows unique ID and not duplicate rows. I want to make Column C and Column D in qlikview. Appreciate the help and guide. Thanks I'm attaching the excel file also.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use below script

Load *, RowNo() as NO Inline

[

  ID

  A

  B

  C

  C

  C

  D

  A

  E

];

Now create a Straight Table

Dimension

NO

ID

Expression

1) COUNT(TOTAL <ID> ID)

2) COUNT(ID)/COUNT(TOTAL <ID> ID)

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Use below script

Load *, RowNo() as NO Inline

[

  ID

  A

  B

  C

  C

  C

  D

  A

  E

];

Now create a Straight Table

Dimension

NO

ID

Expression

1) COUNT(TOTAL <ID> ID)

2) COUNT(ID)/COUNT(TOTAL <ID> ID)

kash04kk
Contributor II
Contributor II
Author

Thanks Manish. Your solution worked.

Regards,