Skip to main content
You can succeed best and quickest by helping others to succeed. Join the conversation.
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Calculating earnings according to counts.

I am getting counts of invitations by Client specific,

count({$<MonthPeriod={"$(=Date(MonthStart(weekend(Max(CanonicalDate))),'MMM-YY'))"}, DateType= {'invitation'},

client_id={'234'}>} invitation_id)

Now i need to calculate earnings for that so for that my requirement will be

like for first 1-3000 invitations = charges a flat fee of $2800,the next 3001-10000 invitations is at rate of $1.50 per invitation,the next 10,001-15000 invitations = is at rate of $1.35 per invitation,the next 15001 and over = is at rate of  $1.25 per invitation.

How could i calculate this.Please help me on this.

4 Replies

It would be better if you have provide sample app or sample data along with your required output.



Interval Match  Using interval match you can calculate the same , in given link there example for marks , try to apply this for your scenario.

Hope this helps you.


Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Contributor III
Contributor III

Did you ever find the answer to this? I'm facing something very similar

Creator II
Creator II

Hi troy,

I did this by using if() function.Its easy to understand and you find lot of example similar to that in community.

I think you can also get by interval Match, as vikas mahajan mentioned.Do some trial and error work you might get it work. I am not sure as i have not tried it or used it.

Let me know if you need any other information.