Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Let me know if it is helping.
Regards,
Rushi
@TheMdu Can you share sample data with expected output?
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