Other formula problem
Hi again with another problem with formula.
if Actividades.Disciplinas.Discilina = "Civil" then
sum('Horas Ganadas Plan') = " Civil"
end
Don't give me anything
10 replies
-
Hi Rafael -
I am unsure what you are trying to do with your 2nd line.
Are you trying to sum the data in a field?
Are you trying to set a field to = "Civil"?
-
Yes I try to sum the hours only the civil Disciplina. I will try to sum the (plan hours plan) but no result and the formula no have errors
-
Hi Rafael
If 'Horas Ganadas Plan' is a field in Actividades the you should be able to do this in one line, something like
sum(Actividades[Disciplinas.Discilina = "Civil"].'Horas Ganadas Plan')
Regards John
-
- No, the 'Horas Ganadas Plan' is in the Document table.
-
Is the document table any of Actividades, Disciplinas or Discilina? Or is it another table altogether? If so is it linked to any of the other three?
-
Now I have Disciplinas, Actividades, and Documents all relationship to one to many and in the Documents have a field 'Horas Ganadas Plan' that I need to sum by Disciplina like ejemplo Civil or Electicidad but I can't for now.
-
-
Hi Rafael
This works
sum((select Disciplinas)[Disciplina = "Civil"].Actividades.Documentos.'Horas Ganadas Plan')
This is complex because you are looking for totals on the Documentos table, and they really belong on the Disciplinas table. At first I thought you could go up the links and back down again but it will only sum for the Disciplina the current record is linked to. Hence having to use a select statement. From the Disciplinas table it's a simple
sum(Actividades.Documentos.'Horas Ganadas Plan')
Regards John
-
John works Many thanks, I never do that, excelent.
-
My pleasure!
Content aside
- Status Answered
- 2 yrs agoLast active
- 10Replies
- 101Views
-
3
Following