March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
HI There
I have a sum value eg Staff member has 10 shift totalling 68 hours and set value of 50 hours minimum
How do i create a measure to get the diffeence. Rostered hours is a sum of x staff member, Actual contract value is set value.
Tthanks
Need ah = AH = [Actual contract hours)
Actual contract hours is set value,
Total shift hours is sum of all hours per staff member
Need Shift hours - Actual contract hours =
Hi @Babycakes ,
Create a measure that will aggregate/sum the two columns and then get the difference
DIFFERENCE measure =
SUM('Table'[Column1]) - SUM('Table'[Column2])
or you can create a calculated column to get the difference
DIFFERENCE Column =
'Table'[Column1] - 'Table'[Column2]
and then create another measure the sum the difference
SUM OF DIFFERENCE =
SUM ( 'Table'[DIFFERENCE Column] )
Proud to be a Super User!
Staff | Start | Finish | Total shift hours | Day | Actual contract hours | Total rostered hours |
SIMPSON John | 2:00 PM | 4:00 PM | 2 | Monday | 40 | 49.66666667 |
SIMPSON John | 9:00 AM | 1:30 PM | 4.5 | Wednesday | 40 | 49.66666667 |
SIMPSON John | 2:00 PM | 4:00 PM | 2 | Thursday | 40 | 49.66666667 |
SIMPSON John | 2:00 PM | 7:00 PM | 5 | Thursday | 40 | 49.66666667 |
SIMPSON John | 4:00 PM | 7:00 PM | 3 | Friday | 40 | 49.66666667 |
SIMPSON John | 5:00 PM | 9:00 AM Next day | 8 | Sunday | 40 | 49.66666667 |
SIMPSON Homer | 3:00 PM | 7:00 AM Next day | 8 | Tuesday | 50 | 68 |
SIMPSON Homer | 7:00 AM | 3:00 PM | 8 | Monday | 50 | 68 |
SIMPSON Homer | 2:00 PM | 3:00 PM | 1 | Tuesday | 50 | 68 |
SIMPSON Homer | 9:00 AM | 5:00 PM | 8 | Wednesday | 50 | 68 |
SIMPSON Homer | 3:00 PM | 4:00 PM | 1 | Thursday | 50 | 68 |
SIMPSON Homer | 3:00 PM | 4:00 PM | 1 | Friday | 50 | 68 |
SIMPSON Homer | 7:00 AM | 3:00 PM | 8 | Thursday | 50 | 68 |
SIMPSON Homer | 7:00 AM | 3:00 PM | 8 | Friday | 50 | 68 |
SIMPSON Homer | 7:00 AM | 3:00 PM | 8 | Saturday | 50 | 68 |
SIMPSON Homer | 3:00 PM | 7:00 AM Next day | 8 | Friday | 50 | 68 |
SIMPSON Homer | 2:00 PM | 3:00 PM | 1 | Friday | 50 | 68 |
SIMPSON Homer | 7:00 AM | 3:00 PM | 8 | Sunday | 50 | 68 |
SIMPSON John | 12:00 PM | 5:00 PM | 5 | Tuesday | 40 | 49.66666667 |
SIMPSON John | 12:00 PM | 5:00 PM | 5 | Tuesday | 40 | 49.66666667 |
SIMPSON John | 2:50 PM | 6:00 PM | 3.16666666666667 | Monday | 40 | 49.66666667 |
SIMPSON John | 10:00 AM | 12:00 PM | 2 | Monday | 40 | 49.66666667 |
SIMPSON John | 10:00 AM | 12:00 PM | 2 | Monday | 40 | 49.66666667 |
SIMPSON John | 10:00 AM | 12:00 PM | 2 | Tuesday | 40 | 49.66666667 |
SIMPSON Lisa | 2:45 PM | 8:15 PM | 5.5 | Tuesday | 60 | 66.5 |
SIMPSON John | 9:00 AM | 3:00 PM | 6 | Friday | 40 | 49.66666667 |
SIMPSON Lisa | 3:00 PM | 11:00 PM | 8 | Monday | 60 | 66.5 |
SIMPSON Lisa | 8:00 AM | 3:00 PM | 7 | Monday | 60 | 66.5 |
SIMPSON Lisa | 7:00 AM | 11:00 AM | 4 | Wednesday | 60 | 66.5 |
SIMPSON Lisa | 1:00 PM | 3:00 PM | 2 | Wednesday | 60 | 66.5 |
SIMPSON Lisa | 3:00 PM | 5:00 PM | 2 | Wednesday | 60 | 66.5 |
SIMPSON Lisa | 9:00 AM | 1:00 PM | 4 | Wednesday | 60 | 66.5 |
SIMPSON Lisa | 8:00 AM | 3:00 PM | 7 | Tuesday | 60 | 66.5 |
SIMPSON Lisa | 7:00 AM | 11:00 AM | 4 | Thursday | 60 | 66.5 |
SIMPSON Lisa | 11:00 AM | 1:00 PM | 2 | Thursday | 60 | 66.5 |
SIMPSON Lisa | 11:00 AM | 5:00 PM | 6 | Wednesday | 60 | 66.5 |
SIMPSON Lisa | 8:00 AM | 3:00 PM | 7 | Saturday | 60 | 66.5 |
SIMPSON Lisa | 3:00 PM | 11:00 PM | 8 | Sunday | 60 | 66.5 |
However there are filters by staff Name (not shown in screen shot for privacy)
Hi,
Write these measures
RH = Sum('PW Staff Templated Hours Report'[Total rostered hours])
AH = sum('PW Staff Templated Hours Report'[Actual contract hours])
Diff = [AH]-[RH]
Hope this helps.
I have already summed
Well then i cannot understand your question. Share the download link of your PBI file and show the result clearly.
Need ah = AH = [Actual contract hours)
actual contract value is not to be summed just exact value
Hence 68-50 =18
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |