Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
Hi,
Assuming Total is a measure, write this measure
Measure2 = [Total]/CALCULATE([Total],ALL(Data[Projecto]))
Hope this helps.
Hi @Anonymous
Not sure if it understand it right but I think you need something like below
Sales 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.
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
Hi @Anonymous
Can you use Excel to demostrate what is the outcome that you are expecting?
Many Thanks
Mariusz
Sure @Mariusz , I can show you on the image below
I need to divide the total column by total All projects.
I sum up all the rows where employee1 and employee2 worked. They are from the test department.
I know that the test department worked on a project by the column timeworked.
I am making a report to display the hours spent on each project. The values from the grid that I've put on the first was gathered with the measure.
The real point, is how to calculate the percentage from the projects where the test department worked.
This is my dataset.
I really appreciate your help
Hi,
Assuming Total is a measure, write this measure
Measure2 = [Total]/CALCULATE([Total],ALL(Data[Projecto]))
Hope this helps.
Hi,
It worked!
Thank you Ashish, you saved me.
Best regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |