Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
silambarasan
Contributor

How to display add/remove and count of id?

Day-1:

ID,Date

A, 1-jan-2016

B,1-jan-2016

C,1-jan-2016

D,1-jan-2016

Day-2

ID,Date

A, 2-jan-2016

B,2-jan-2016

C,2-jan-2016

E,2-jan-2016

I want three tables

Table one display count of id on daily basis.

Table two display newly added id on daily basis

Table three display removed id.

table-1

MonthYear 12345678910111213141516171819202122232425262728293031
Jan-20164400000000000000000000000000000
Feb-20160000000000000000000000000000000
Mar-20160000000000000000000000000000000
Apr-20160000000000000000000000000000000
May-20160000000000000000000000000000000

if i click 2-jan in table-1 ,it will show list of new id added and list of existing id removed in two separate table

Eg:

Day-2

table-2

ID newtype
Enew

table-3

ID newtype
Dremove

johnwQlikView App Developmenthicgwassenaarswuehl

Message was edited by: Silambarasan M

9 Replies

Re: How to display add/remove and count of id?

Still trying to think what the best way would be to show the removed, but check out the first two tables in the attached application

Capture.PNG

sujeetsingh
Honored Contributor III

Re: How to display add/remove and count of id?

Just do one thing is that join all the three tables in your model with date + ID as key.Now maintain three columns as ID from First table as ID_Pre, ID from second table as ID_Post.

Then you can derive a logic as IF ID_Pre<>ID_Post then 1 as ID Added some thing like that ...

silambarasan
Contributor

Re: How to display add/remove and count of id?

Thanks for your help,same thing i did.I am also looking to find the removed id

silambarasan
Contributor

Re: How to display add/remove and count of id?

could you please attach qvw file

qliksus
Valued Contributor

Re: How to display add/remove and count of id?

Are you looking for something like this

When you select 01/02/2016

 

When you select 01/03/2016

 

New Expression : (Count({1<Date={'$(=only(Date))'}>}  DISTINCT Date) and  count({1} DISTINCT Date)=1 )

Removed Exp : (Count({1<Date={'$(=only(Date))'}>}  DISTINCT Date)=0 and count({1<Date={"<$(=only(Date))"}>} DISTINCT Date)>=1 )

silambarasan
Contributor

Re: How to display add/remove and count of id?

In your Removed Expression you shows all the removed ID till date but I want to know removed id from previous date not before than yesterday.

qliksus
Valued Contributor

Re: How to display add/remove and count of id?

Just change the Remove Expression as below

Removed Exp : (Count({1<Date={'$(=only(Date))'}>}  DISTINCT Date)=0 and count({1<Date={'$(=date(only(Date)-1))'}>} DISTINCT Date)>=1 )

silambarasan
Contributor

Re: How to display add/remove and count of id?

qliksus please help..how to do this in back end scripting not in front end expression

silambarasan
Contributor

Re: How to display add/remove and count of id?

How to find removed id?i am waiting for your response

Community Browser