Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find Repeated Product ID's??

Dear Friends,

I wanted to see any Product ID in last 15 days closed call report is repeated in current day logged report. To be specific, any Product ID which is closed in last 15 days is repeated in the current day again or not. I wanted to count the number of Product ID repeated in current day report.

Repeated Product ID = X

Repeated Product ID % = X/Current day logged calls (X/14)

Please find the  sample table of data below. How to do this in Qlikview... Please help me out

I have written below code...

Current day code: Count({< Calendar_Date = {'=$(=Date(vEndDate))'},Calendar_Month=,[Calendar_Day]=>} Product_Id)

Laste 15 days Code : Count({< Calendar_Date = {'>=$(=Date(vStartDate))<=$(=Date(vEndDate))'},Calendar_Month=,[Calendar_Day]=>} Product_Id)

Product IDCall NoCall Closed DateLast 15 Days Total Closed Calls
9
QB12370123404/17/20141
CB12370678104/28/20141
QS123700345204/24/20141
QB12570523404/18/20141
CB1267490204/21/20141
QB1247764204/30/20141
QB1257864304/26/20141
VS12376800204/28/20141
ES1237642404/25/20141

Product IDCall NoCall Created Date (Current Day)Current Day Total Created Calls
14
QB123700605291404/30/20141
QB124700605439704/30/20141
VS123700605448704/30/20141
LF34700605128604/30/20141
L9LF700605447504/30/20141
WXY700605315404/30/20141
ABC700605411004/30/20141
1THDB700605290904/30/20141
NY64700605039304/30/20141
KJNSX700605037904/30/20141
NJSX700605037504/30/20141
LJKNX700605309104/30/20141

Here QB123, QB124 and VS123 are REPEATED. Now the calculation should be (3/14) *100

Please help me to do this in Qlikview.

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw


talk is cheap, supply exceeds demand
sujeetsingh
Master III
Master III

You can achieve this in two ways.

1) Use group by and count(ID) and then you can get those with count >=2

2) Use peek and check that previous ID matches the next

Not applicable
Author

Hi Gysbert,

I am writing Call Created Current Day as variableMaxDate =Max(Date) .

Count({

“Whatever the mind can conceive and believe,it can achieve”

Not applicable
Author

Hi Gysbert,

I am writing Call Created Current Day as variableMaxDate =Max(Date) .

variableMaxDate= is a variable that i had created in my dashboard.

Product ID and these  dates are coming from different tables

Count({< Calendar_Date = {'=$(=Date(variableMaxDate))'}>} Product ID))

In the given expression by you, how can  I include my variable ??

Coz, Call Created Date (Current Day) = Calendar _Date = {'=$(=Date(variableMaxDate))'}

num(count({<[Call Created Date (Current Day)]={'*'}, 

  1. num(count({<Calendar _Date = {'=$(=Date(variableMaxDate))'} = {'*'}, Product ID=p({<Call_Date{'>=$(=Date(variableLast15DaysDate))<=$(=Date(variableMaxDate))'} ={'*'}>}Product ID)>}distinct Product ID)

……………………………..this is not working

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Can you post a small qlikview document with all the relevant tables and data? This document can explain how: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand
ali_hijazi
Partner - Master II
Partner - Master II

use this in your expression

if (Count(ID)>1, Count(ID))

and add the desired dimension in a pivot table

I can walk on water when it freezes
perumal_41
Partner - Specialist II
Partner - Specialist II

Try thies expression

Repated Product : Count({< Calendar_Date = {'>=$(=Date(vStartDate))<=$(=Date(vEndDate))'},Calendar_Month=,[Calendar_Day]=,Product_Id={"=Count({< Calendar_Date = {'=$(=Date(vEndDate))'},Calendar_Month=,[Calendar_Day]=>} Product_Id)>=1"} >} Product_Id)