Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I am new to Qlik.
I want to count the transaction happened in the past 30 days from the given day for each customer.
So I tried to use this code in the sheet.
Aggr(count(distinct if( NUM(Date(REG_DATE,'YYYY-MM-DD')-30) <=REG_DATE <=NUM(Date(REG_DATE,'YYYY-MM-DD'))),TRANSID),CUSTOMER)
So this code aims to get the count of distinct transaction id (TRANSID) for every customer (CUSTOMER) for the past 30 days from the given transaction date,(REG_DATE)
Every data has the given transaction date as I am using the transaction data.
Help me please.
sorry I don't understand how the results were arrived at.
this is what could work out.
sorry, I don't understand how the 'result' in your table got calculated. can you please share how TRANSID 100067 has 3 as a result against REG_DATE of 2022-10-24?
this is what I was able to do so far:
Okay maybe your way of counting did not included the transaction of that day.
So I just considered 10067,10071,10072 as three because they all took place in 2022/10/24.
However, I do not want to double count 10067 eventhough it took place in 2022/9/26 and 2022/10/24.
Because this sample data has the same customer number, I want to count the distinct transactionid that occured in last 30 days from the given REG_DATE.
Thank you for the efforts to help me. I do really count on your Qlik skills.