Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hitha1512
Creator
Creator

Writing loop at the backend to calculate cost

Hi Team,

I need to calculate the below using loops.  

I have a table "Ticket" holding the number of tickets against dates. Need to calculate the cost for the below range of ticket count. 

Min Count of Tickets Max Count of Tickets Amount to be charged in dollars
1501 1750 500 $
1751 2000 550 $
  for every additional range of 250 tickets 90 $

 

Up to 2000 ticket count, the cost is fixed. Post 2000 ticket count, addition of 250 tickets to be charged 90. 

Example:

Count of ticket Price
1569 500 $
2000 550 $
2249 550+90 $
2500 550+90+90 $

 

Regards,

Hitha Dhani

0 Replies