Hour Report, can you divide two calculations? | Community
Skip to main content
ajdifonzo
Level 3
December 5, 2023
Question

Hour Report, can you divide two calculations?

  • December 5, 2023
  • 1 reply
  • 517 views

I’m working in an Hour report and have two calculated columns, one for “Billable Hours” as follows

aggregator.displayformat=doubleAsDouble

aggregator.function=SUM

aggregator.namekey=hour.plural

aggregator.valueexpression=IF({hourType}.{countAsRevenue}=true,{hours},"")

aggregator.valueformat=doubleAsDouble

displayname=Billable Hours

textmode=true

valueexpression=IF({hourType}.{countAsRevenue}=true,{hours},"")

valueformat=doubleAsDouble

 

 

The other is “Total Hours (Less X40 & PTO)

 

aggregator.displayformat=doubleAsDouble

aggregator.function=SUM

aggregator.namekey=hour.plural

aggregator.valueexpression=SUB({hours},IF({hourType}.{name}="MCS - X40",{hours},IF({hourType}.{name}="MCS - Paid Time Off",{hours},"")))

aggregator.valueformat=doubleAsDouble

displayname=Total Hours (Less X40 & PTO)

textmode=true

valueexpression=SUB({hours},IF({hourType}.{name}="MCS - X40",{hours},IF({hourType}.{name}="MCS - Paid Time Off",{hours},"")))

valueformat=doubleAsDouble

 

I would like another column that will divide “Billable Hours” by “Total Hours (Less X40 & PTO)”

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

skyehansen
Community Advisor and Adobe Champion
December 6, 2023

You would not be able to refer to the two column's results, but I don't see any reason why you would not be able to just copy and paste the two valueexpressions into a third one. The syntax for division is 

DIV(number1, number2, ...)

so I would just picture some sort of monstrous valueexpression=DIV((valueexpression1),(valueexpression2))

 

Give it a shot. Just watch your parens, and have a good time.