4 Replies Latest reply: Nov 15, 2016 10:04 PM by Supriya R

# 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.

• ###### Re: Calculating earnings according to counts.

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

• ###### Re: Calculating earnings according to counts.

Hi,

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.

Vikas

• ###### Re: Calculating earnings according to counts.

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

• ###### Re: Calculating earnings according to counts.

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.

Regards,

Supriya