Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
TheMdu
Contributor III
Contributor III

Show incremental count against records

Hi, I want to add a column on a pivot /tablewhere every payment received from a client a record is added. For example a client’s account was opened in Jan 2020 and started making payment in Jan. We’ve received 9 payments so far. I want the column to show all payments with increment of 1, across the entire client database. I had a look at rec() and row() an they seem to be the closest functions to what I’m trying to achieve, but counter should start at 1 for every client

 

3 Replies
rushikale0106
Contributor III
Contributor III

Hi,

I don't know how much it will help you to solve queries. But I guess you can check following links for any guidance.

https://community.qlik.com/t5/New-to-QlikView/What-is-NoOfColumn-and-Column-No/td-p/859720

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/....

Let me know if it is helping.

 

Regards,

Rushi

Kushal_Chawda

@TheMdu  Can you share sample data with expected output?

edwin
Master II
Master II

try this as expression in straight table:

=if(isnull(above(Client)),1,                                       //this is for the first record
if(above(Client)=Client,Above([Counter])+1,  //prior client is the same so increment
1)                                                                                        // new client
)

 

assuming Client is the field name for client, there must be some PayDate  (this is what you sort  to order your payments)

call your counter expression as Counter (you increment this by 1 if prior client is the same as current client, else set to 1 (if first payment) 

you need to determine the counter dynamically and not in script, once filters are applied and you used rowno() as counter in your script, then some of the counters will not be selected thus you will have missing counter records