Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

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
Anonymous
Not applicable

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

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

anbu1984
Master III
Master III

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

MarcoWedel

please post sample data and expected result

thanks

regards

Marco

sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi Dinesh.

Please post your application here.

-Sathish

dseelam
Creator II
Creator II
Author

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
Creator II
Creator II
Author

Can see the sample QVW

dseelam
Creator II
Creator II
Author

Can see the sample QVW

Anonymous
Not applicable

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

MarcoWedel

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