Usually I do a formula to calculate 2 times, but sometimes I measure only one time. I want to be abl

Average, I do two calculations, there will be morning and afternoon.

Let's take 2 this time and come + together and divide 6.

But perhaps the measurement is only for one time period, either in the morning or in the afternoon, but needs to be calculated. Both have only one time, how do you use the formula?

Well, for this I use a simple formula which is
[morning + afternoon]/6
[Morning+Afternoon] So I made a virtual column as well as a morning and afternoon column.

Solved Solved
0 4 125
2 ACCEPTED SOLUTIONS

Do you have an actual question here? If so then it would be helpful to provide some more information about your data structure, what it is you are trying to achieve and what you have tried which didn't work.

View solution in original post

If I understand correctly you want the average to be calculated by dividing by 6 when hours are entered in both morning and afternoon, or by 3 if it is only one of them. The following expression should work

IF(([Morning] + [Afternoon] > 0),
  ([Morning] + [Afternoon]) 
  / 
  (
    IF(([Morning] > 0), 3, 0)
    + 
    IF(([Afternoon] > 0), 3, 0)
  ),
  0
)

View solution in original post

4 REPLIES 4

Do you have an actual question here? If so then it would be helpful to provide some more information about your data structure, what it is you are trying to achieve and what you have tried which didn't work.

The formula for the mean now is

Take the morning and afternoon values together and divide by 6.

But some days there is only the morning value. no afternoon But I want it to calculate too.

I apologize for not communicating clearly.

 

numfon_naka_0-1652239458780.png

 

If I understand correctly you want the average to be calculated by dividing by 6 when hours are entered in both morning and afternoon, or by 3 if it is only one of them. The following expression should work

IF(([Morning] + [Afternoon] > 0),
  ([Morning] + [Afternoon]) 
  / 
  (
    IF(([Morning] > 0), 3, 0)
    + 
    IF(([Afternoon] > 0), 3, 0)
  ),
  0
)

Thank you for your help.

I'm not good at formulas at all. I relied on the recipes on these sites. and to modify again with someone to help

If no one helped, I would be in a bad mood.

I'm sorry if I'm using the wrong word, because I use google translate.

Top Labels in this Space