Forum Discussion
Customers contacted per period
Hi everyone,
I have a table of clients, their past due balances and dates/times when these clients were contacted. I'm trying to show whether each client was contacted the appropriate amount of times. If a company has a past-due balance that's up to 30 days late, their balance will appear under the "Balance30" column. If the client is 30-60 days late, their balance will show up under "Balance60." Customers are supposed to be contacted once per period i.e. if they have a Balance30 > 0, they should have a contact date from some time in the past 30 days. If they have a Balance60, there should be a contact date in the past 30 days as well as one in the past 30-60 days. How can I display whether each client was contacted the appropriate amount of times?
2 Replies
- Greg_Deckler
Community Champion
Anonymous - Maybe:
Measure = VAR __Days = SWITCH(TRUE(), NOT(ISBLANK([Balance30])),30, NOT(ISBLANK([Balance60])),60, NOT(ISBLANK([Balance60])),90, 0 ) VAR __RequiredContacts = __Days / 30 VAR __Table = FILTER('Table',[Date]>=TODAY()-__Days) VAR __Contacts = COUNTROWS(__Table) RETURN IF(__Contacts >= __RequiredContacts,1,0)- AnonymousNot applicable
Thank you for the help. I'm getting an error on the Balance30, Balance60, Balance90 in the ISBLANK functions. It looks like I'm getting the error because those are all columns in my data source and not measures.