Hi
Please could someone assist in pointing me in the right direction.
I have a table which lists cost code categories and what I am trying to do is obtain the percentage of each cost code based on the total prime cost. I needed to aggregate the prime cost based on a filter as the table includes revenue and other costs which need to be excluded.
My formula works for each row but the percentage is not correct.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Prime Cost filter[/TD]
[TD]Abs Forecast[/TD]
[TD]Forecast %[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]290 308[/TD]
[TD]10%[/TD]
[/TR]
</tbody>[/TABLE]
I created a measure which has the same properties as my denominator above to cross check.
The total is 3 767 790. The correct percentage is 290 308/3 767 790 =7%. However my formula currently returns 10%, not sure what the problem could be.
Please could someone assist in pointing me in the right direction.
I have a table which lists cost code categories and what I am trying to do is obtain the percentage of each cost code based on the total prime cost. I needed to aggregate the prime cost based on a filter as the table includes revenue and other costs which need to be excluded.
My formula works for each row but the percentage is not correct.
Code:
Forecast % =calculate(sum([Abs Forecast]))/calculate(sum([Abs Forecast]),filter(Projectj56,Projectj56[Prime Cost Filter]=1)))
[TABLE="width: 500"]
<tbody>[TR]
[TD]Prime Cost filter[/TD]
[TD]Abs Forecast[/TD]
[TD]Forecast %[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]290 308[/TD]
[TD]10%[/TD]
[/TR]
</tbody>[/TABLE]
I created a measure which has the same properties as my denominator above to cross check.
Code:
Forecast Prime Cost:=calculate(sum([Abs Forecast]),filter(Projectj56,[Prime Cost Filter]=1))
The total is 3 767 790. The correct percentage is 290 308/3 767 790 =7%. However my formula currently returns 10%, not sure what the problem could be.