Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

How to count on fields that have changes in value.

Hi guys,

I have a requirement:

- display total no of records - i assume is count(record_ID) ?

- display records that have made changes of the total of number records?

I have attached a sample qvw with inline data. 

Please help guys.

Rgds,

Jim

24 Replies
sunny_talwar

You can ignore selections in Year field

=Count(DISTINCT {<Record_ID = {"=Len(Trim(Only({<Rating, Record_ID = P(Record_ID), Year>}Rating))) = 0"}>}Record_ID)

=Concat(DISTINCT {<Record_ID = {"=Len(Trim(Only({<Rating, Record_ID = P(Record_ID), Year>}Rating))) = 0"}>}Record_ID)

jim_chan
Specialist
Specialist
Author

Sunny bro,

I added Year in. it works.

Last question. this is a sample file. however, what if there are more than just these 3 filters(year, rating., record_ID) , what if user wanted to click on any of the filters( maybe more than 10), add all innnnn???

=Concat(DISTINCT {<Record_ID = {"=Len(Trim(Only({<Year,Rating, Record_ID = P(Record_ID)>}Rating))) = 0"}>}Record_ID)

Rgds,

Jim

sunny_talwar

You can ignore all filters by using 1, but is that what you want? The results won't change based on any selections?

=Concat(DISTINCT {1<Record_ID = {"=Len(Trim(Only({1}Rating))) = 0"}>}Record_ID)

jim_chan
Specialist
Specialist
Author

Sunny bro, nono.

What I mean is, I want to allow users to select any filters. Currently I have about 6filters.

Rgds

Jim

jim_chan
Specialist
Specialist
Author

Hello Sunny,

what needs to be changed(expression) if the user has 3 years of data 2014,2015,2016.  and user just want to see current compare to previous only. instead of showing all the changes(2014,2015,2016?)

Rgds,

Jim