Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I know there are lots of similar questions to this but couldnt find any that suited me.
I'm trying to get the sum of products from a pivot table (second table) rather the sum of the totals (first table).
My expession is
=Sum({<Tipo = {"STD"},Q=,[Mês]=,Valor = {"HRS"},Ano={$(=Getfieldselections(Ano))}>} Montante)*
(Sum({<Tipo = {"ACT"},Q=, Valor = {"HRS"}>} Montante)-Sum({$<Tipo={$(=GetFieldSelections(Tipo))},Valor = {"HRS"},Q=>} Montante))
Any help? Thanks a lot!
Please try (adjust your field names)
Sum(Aggr(
Sum({<Tipo = {"STD"},Q=,[Mês]=,Valor = {"HRS"},Ano={$(=Getfieldselections(Ano))}>} Montante)*
(Sum({<Tipo = {"ACT"},Q=, Valor = {"HRS"}>} Montante)-Sum({$<Tipo={$(=GetFieldSelections(Tipo))},Valor = {"HRS"},Q=>} Montante)), BRAND, PLANT))
Please try (adjust your field names)
Sum(Aggr(
Sum({<Tipo = {"STD"},Q=,[Mês]=,Valor = {"HRS"},Ano={$(=Getfieldselections(Ano))}>} Montante)*
(Sum({<Tipo = {"ACT"},Q=, Valor = {"HRS"}>} Montante)-Sum({$<Tipo={$(=GetFieldSelections(Tipo))},Valor = {"HRS"},Q=>} Montante)), BRAND, PLANT))
Perfect! Thank you!