Forum Discussion
ukeasyproj
8 years agoHelper II
incorrect total for measure
I have a time entry table that is set up as follows: UserID | Entry Date | Duration| User Exemption Status | PTO/Holiday Duration is just how many hours the user logs that day, User Exemp...
Anonymous
8 years agoNot applicable
Gotcha, that condition makes it a little trickier. Try this:
measure =
IF(
HASONEFILTER(Table1[UserId]),
IF(
[Hours Worked] > 40,
40,
[Hours Worked]
),
SUMX(
Table1,
IF(
[Hours Worked] > 40,
40,
[Hours Worked]
)
)
)Because of the extra step, you need to use SUMX to specify how you want to take that sum for the Grand Total. Then you will get something like this:
Hope this helps,
Parker
ukeasyproj
8 years agoHelper II
Anonymous
Hey thanks for that measure, it works fine
but when I add in additional columns to the table related to the user's meta data (such as user's supervisor name), the measure breaks
- Anonymous8 years agoNot applicable
Is that field from a different table? Could you post a snippet of the data that you're working with?
Thanks,
Parker