Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Lucjan_Szulik
Regular Visitor

Display % per month and not for grand total

Hi, 

 

I think the issue is rather easy but I got stucked here and trying to find a solution since couple of hours. 

 

Data pulles from SQL server.

 

I would need to have % of absenteeism per month. In excel I would do something like that:

 

sumifs(absHours,projectCriteriaRange,project,monthCriteriaRange,month)/sumifs(plannedHours,projectCriteriaRange,project,monthCriteriaRange,month)

 

Based on that I would be able to build graph that would show evolution on absenteeism on monthly basis.

 

My issue with PowerBI is, that it is giving me total amount of absence and presence hours (that is also great) but is not returning abs% per month correctly. I can only make it to "Show value as Porcentage of grand total".

 

Any advice how I could show what is the % of blueish part of the column vs yellowish+blueish?

 

PowerBiquery.JPG

Thanks!

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Lucjan_Szulik,

 

Please try measure:

percentage =
CALCULATE (
    SUM ( Project[Hours] ),
    FILTER ( Project, Project[Type] = "Absence" )
)
    / SUM ( Project[Hours] )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Lucjan_Szulik,

 

Please try measure:

percentage =
CALCULATE (
    SUM ( Project[Hours] ),
    FILTER ( Project, Project[Type] = "Absence" )
)
    / SUM ( Project[Hours] )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yuiliana, 

 

Seems like this is what I needed!

 

Thank you very much!

 

 

Heart

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors