The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Good day,
I am VERY new to measures and could use some guidance please. I have a table consisting of scheduled events by employees in the future. (I have a date table that maps week numbers to each date, however in the sample data below I combined it all into one table). I'm trying to somehow add a measure to my schedule table that I can drag into the second picture below to add my 'missing time' for each week. By the missing time, I mean any employee's time that is < 8 hours for that day. So, for example, if the employee had two scheduled events for a day, each 3 hours, the measure would show 2 hours for that day.
Here's a simplified example of what I'm trying to evaluate (the yellow highlight):
Here's a screen shot of my report (only missing the data for the missing time in each week)
Here's the actual table
THAAAAANK YOU!!!
Rob
Hi @Anonymous ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien
Hi @Anonymous ,
Test the below measure:
test1 =
IF (
CALCULATE (
SUM ( 'Table'[Hours Scheduled] ),
FILTER (
ALL ( 'Table' ),
'Table'[Date] = MAX ( 'Table'[Date] )
&& 'Table'[Employee] = MAX ( 'Table'[Employee] )
)
) <= 8,
8
- CALCULATE (
SUM ( 'Table'[Hours Scheduled] ),
FILTER (
ALL ( 'Table' ),
'Table'[Date] = MAX ( 'Table'[Date] )
&& 'Table'[Employee] = MAX ( 'Table'[Employee] )
)
),
0
)
Best Regards
Lucien
Amit,
I tried this:
RemainingHours = Sumx(SUMMARIZE(ScheduleData, DateTable[Week], ScheduleData[Member_ID], "_1", SUM(ScheduleData[Hours_Sched])), 8-[_1])
and it didn't appear to work:
I'm sure it's something in my translation of your formula. I'm also curious what the "_1" parameter is doing?
Thank you,
Rob
@Anonymous , based on what I got. You can get remaining hour and use that with scheduled hour in stacked visual
Remaining Hour =Sumx(Summmarize(Table, Table[Week], Table[Employee], "_1", Sum(Table[Scheduled Hour])), 8- [_1])
Amit,
First, THANK YOU! Just a couple of follow-up questions please:
Amit - thank you SO much for your quick and thoughtful response!
-Rob
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |