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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sahury
New Member

tag based on total of sum by each resource

Hi All! I've just begun learning PBI and my background is mostly Excel. I know in my heart this formula/query might be simple but I just haven't been able to make it work. I'm trying to "label" each sum result according to either above or below 1 to know the offenders on time tracking in my team.

 

My ideal matrix visual would look like this, the whole page is filtered by current month so the "offense" formula would have to be dinamic? or integrate filters? (I've tried this with calculate-sumx-filter withour sucess)

 

ResourceTimeOffense
Name 10.3Incomplete
Name 21.5Overtime
Name 3(blank)Missing

 

The matrix is composed of one list from sharepoint, there are many columns but this are the important ones. Resource ID has a relationship with the Header list that brings other info like management. 

 

1. Detail

ProjectResourceResource IDMonthTime
Project1Name 1110/2/20190
Project2Name 1110/1/20190.1
Project3Name 1110/14/20190.5
Project1Name 2210/5/20191

 

You can see a single person can be in many projects and for each month enter different time but we are really trying to label the offense based on every month's total.

 

This is some of what I've tried so far by creating a Measure I can add to the matrix... but it does not work or it labels everything "incomplete". Appreciate any help since my deadline is near

 

 

Var sumar =
CALCULATE(
SUM(FTEDetail[Actual]),
FILTER(FTEDetail,FTEDetail[MonthFTE]=MONTH(TODAY())),
FILTER(FTEDetail,SELECTEDVALUE(FTEDetail[ResourceID])
)
Var tag = IF(sumar>1,"Overtime",IF(sumar=1,"Complete",IF(sumar<1,"Incomplete","Missing")))

return tag
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

What you are trying to achieve shouldn't be too complicated.

I took the sample you provide and came up with 2 measures. You can paste the first measure in the second measure if you rather have it all together.

Measure 1:

Measure =
CALCULATE (
    SUM ( FTEDetail[Time] );
    MONTH ( FTEDetail[Month] ) = MONTH ( TODAY () )
)

Measure 2:

Measure 2 =
SWITCH (
TRUE ();
[Measure] = 1; "Complete";
[Measure] > 1; "Overtime";
[Measure] < 1; "Incomplete";
"Missing"
)

If you have any questions don't hesitate to ask.

 

Kind regards
Joren Venema

Data & Analytics Consulant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

What you are trying to achieve shouldn't be too complicated.

I took the sample you provide and came up with 2 measures. You can paste the first measure in the second measure if you rather have it all together.

Measure 1:

Measure =
CALCULATE (
    SUM ( FTEDetail[Time] );
    MONTH ( FTEDetail[Month] ) = MONTH ( TODAY () )
)

Measure 2:

Measure 2 =
SWITCH (
TRUE ();
[Measure] = 1; "Complete";
[Measure] > 1; "Overtime";
[Measure] < 1; "Incomplete";
"Missing"
)

If you have any questions don't hesitate to ask.

 

Kind regards
Joren Venema

Data & Analytics Consulant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors