Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Count amount of duplications - with conditions

Hello All,

I am trying to find amount of duplications within a database, based on certain columns with conditions.

Below is a sample of the data I have:

  • ID, VednorCode, ItemName is the raw data.
  • Duplications is what I am trying to get (In Yellow)

IDVendorCodeItemNameDuplications
1H9004280062512
2H900428006357-
3H9004280062512
4H90042800PD-6251-3002
5H90042800PD-6251-3002
6H90042800PD-6252-3001
7H03000785PD-6252-300-
8H03000785PD-6011-300-
9H03000773PD-6011-3001
10H030007736357

-

Duplications column should follow the below guidelines:

  • Show the total amount of times each combination of VednorCode and ItemName appears.
    • Amount in each line refers to VendorCode and ItemName in the same line.


  • Columns where one of the following happens should not be counted:
    • ItemName is '6357'
    • VendorCode is 'H03000785'.


I am already familiar with Count(TOTAL <VendorCode, ItemName> ID) as a solution, but I want to add conditions to it.

Any ideas?

1 Solution

Accepted Solutions
Highlighted
Champion II
Champion II

Re: Count amount of duplications - with conditions

Try below

Count({<ID = e({<ItemName ={6357}>+<VendorCode={'H03000785'}>} ID) >} TOTAL <VendorCode, ItemName>   ID)

View solution in original post

1 Reply
Highlighted
Champion II
Champion II

Re: Count amount of duplications - with conditions

Try below

Count({<ID = e({<ItemName ={6357}>+<VendorCode={'H03000785'}>} ID) >} TOTAL <VendorCode, ItemName>   ID)

View solution in original post