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.
dseelam
Contributor

Automated count

Hello Qlik Folks,

How can I auto count Id's for only last year, last quarter and last half year in straight or pivot tables using if condition or set analysis

13 Replies
konstantin
Contributor III

Re: Automated count

Last Year: Count({<Year={$(=Max(Year))}>} ID)

Last Quarter: Count({<Quarter={$(=Max(Quarter))}>} ID)

anbu1984
Honored Contributor III

Re: Automated count

Last Year: Count({<Year={$(=Year(Today())-1)}>} Id)

Re: Automated count

please post sample data and expected result

thanks

regards

Marco

sathishkumar_go
Contributor III

Re: Automated count

Hi Dinesh.

Please post your application here.

-Sathish

dseelam
Contributor

Re: Automated count

Hear is the sample QVW

you can see duplicate ID with different counts but what I want to see is single ID with sum of id life, 180 days and last trend, i don't want duplicate ID's

I am ready to remove SC Reading Date and Reading if they are the reason for duplicates but it collapse whole table

is there a possibility where I can remove them ?

dseelam
Contributor

Re: Automated count

Can see the sample QVW

dseelam
Contributor

Re: Automated count

Can see the sample QVW

s_kunte23
Contributor III

Re: Re: Automated count

Hi,

I'm not sure what your expressions are about. To answer your last question I've attached an example how you can cut the dimensions to one ID Value. Maybe you can elaborate on the concept of your expressions and how this is reflected in your Data Model?

Best regards

Stefan

Re: Re: Automated count

Hi,

maybe the ID life column could be defined like (it seems to calculate an annual change rate of reading):

=(FirstSortedValue([Reading],-[SC Reading_DATE])-FirstSortedValue([Reading],[SC Reading_DATE]))/(Max([SC Reading_DATE])-Min([SC Reading_DATE]))*365

In your inital chart definition you have multiple occurences of ID because of multiple occurences of the SC Reading_Date dimension.

QlikCommunity_Thread_135232_Pic1.JPG.jpg

hope this helps

regards

Marco

Community Browser