8 Replies Latest reply on Apr 12, 2018 7:45 AM by Jonas D

# Calculated field based on max date & cost

Hi,

Anyone here that can suggest a calculation that will get the text "increase" if the latest date (max date) of each item has the highest cost, else it should show "decrease" as below example

 if cost in max date is the highest, then "increase", else "decrease" item date cost increase/reduction A 11-12-2017 2 decrease A 01-01-2018 4 decrease A 05-02-2018 1 decrease B 01-02-2017 4 increase B 03-04-2017 4 increase B 02-02-2018 5 increase

• ###### 1. Re: Calculated field based on max date & cost

Hi Jonas,

You need to select font size on Text Label as per Condition

Thanks

Deepak

• ###### 2. Re: Calculated field based on max date & cost

Hi Deepak,

thanks, but you misunderstood my problem.

its not the text i want to increase or decrease in size. I want to take the latest date (max date) of each item and then if it has the highest cost (max cost) it should put the text "increase" and if don't have the highest cost it should put the text "decrease"

• ###### 3. Re: Calculated field based on max date & cost

Hi Jonas,

Something like this?

• ###### 4. Re: Calculated field based on max date & cost

hi Tushar,

no your example is missing the cost

it should take the last date (max date) for each item and if that date has the highest cost the lines with that item should be "I" otherwise it should be "D"

• ###### 5. Re: Calculated field based on max date & cost

Check this image.

Let me know if I am missing anything.

~Tushar

• ###### 6. Re: Calculated field based on max date & cost

all the lines in for item A should be "D"  (last date "05-02-18" don't have the highest cost)

all the lines for item B should be "I" (last date "02-02-18" have the highest cost)

in short Item A has decreased in cost and item B has increased in cost

Jonas

• ###### 7. Re: Calculated field based on max date & cost

Hi, Jonas

something like this? If yes, please find attached workbook

Hope this helps

ZZ

• ###### 8. Re: Calculated field based on max date & cost

thanks ZZ, thats great (I had to change SUM to MAX and it worked, like I wanted)