Forum Discussion
Percentagem from a calculated value
I have a calculated value that filter the hours worked from two employee.
They work on several projects, and I got the amount of hours with the following measure
Hours =
DIVIDE(
CALCULATE(
SUM(fApontamento[timeworked]);
FILTER(
fApontamento;
fApontamento[author] = "employee1" || fApontamento[author] = "employee2"
)
);3600)I am able to list the hours from each project now.
Now I need to know the percentage spent on each project and I have no idea on how to do that.
On the stacked barchart I need to replace the hours with the percentage.
Hi,
Assuming Total is a measure, write this measure
Measure2 = [Total]/CALCULATE([Total],ALL(Data[Projecto]))
Hope this helps.
6 Replies
- MariuszCommunity Champion
Hi Anonymous
Not sure if it understand it right but I think you need something like belowSales Red blue % Brakedown = VAR author = {"employee1", "employee2"} VAR authorHrs = CALCULATE( SUM(fApontamento[timeworked]); KEEPFILTERS( fApontamento[author] IN author ) ) VAR authorHrsAll = CALCULATE( SUM(fApontamento[timeworked]); fApontamento[author] IN author ) RETURN DIVIDE( authorHrs, authorHrsAll )Regards.
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Thank you Mariusz for your time, but I'm afraid to say that it didn't fit my problem.
The measure that I have brings me the value 744,30. If I put it on a table with the projects, it brake the value into the projects's values, as shown on the pic.
I need to calculate the percentage of that broken value of each project with the value 744,30
EVO Almoxarifado = 67,50
EVO Aplicativo = 16,80
.
.
.
So I don't know how to get each of these value and divide it by 744,30, to get the final percentage of the projects
- MariuszCommunity Champion
Hi Anonymous
Can you use Excel to demostrate what is the outcome that you are expecting?
Many ThanksMariusz