Ok I am getting close to how I want this to w...

Ok I am getting close to how I want this to work.

I need help tweeking it if possible:

Here is the expression in my template:

CompanyID: <<[CompanyID]>> Company: <<[Company]>> PM Sell: <<[PM Sell]>> Total Annual Hrs. Sold:<<Start: [Related Estimates By Company]>><<[Sum Hours]>><>

Here is how it is coming through on the email:

CompanyID: Portland Greyhound

Company: Portland Greyhound

PM Sell: $10,928.00

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

Total Annual Hrs. Sold:70

I ONLY want โ€œTotal Annual Hrs. Sold:70โ€ to show up 1x on the report.

The reason it is coming through 8xโ€™s is because I have (8) pieces of equipment in the table, that it is calculating for me.

Is there a way to make it only give me (1) response?

0 7 312
7 REPLIES 7

@Aleksi_Alkio Would I do this through MAX ROW function?

maybe make another virtual column?

@Steven_Jeffery

It looks like you are trying to track โ€œTotal Annual Hrs.โ€ by company. If so, I would add a virtual column to the โ€œCompanyโ€ table that computes the โ€œTotal Annual Hrs.โ€

Having done that, you would eliminate the <> <> and simply replace them with the name of your new virtual column.

That has the added advantage that the โ€œTotal Annual Hrs.โ€ can also be displayed when the Company record is displayed by the application.

If your data is stored in a worksheet, you could compute the โ€œTotal Annual Hrs.โ€ in a worksheet expression. This might be more efficient if lots of computation is required to compute the total. However, the total would only be updated when you do an update that touches the worksheet.

But the total annual hrs are housed in the estimate table, which is related to the company table.

So how do you make a virtual column that calculates the total annual hours in the related estimate table?

In the company table, if your related col is called โ€œRelated Estimatesโ€, you can use SUM([Related Estimates][Hours])

@Bellave_Jayaram

Thanks Jayaram.

I have added this information under topic โ€œSumโ€ in article https://help.appsheet.com/expressions/expression-types/list-expressions-and-aggregates

Intercom app.intercom.io

You are welcome, Phil.

Thanks guysโ€ฆ

Top Labels in this Space