Forum Discussion
Total for measure doing row level calculation
I am doing a labor report where I identify each employee that works a >= 20 hour shift completed on a certain date. The Labor tables has Employee ID, Location ID, Timecard Date, Hours, Dollars and many other columns. Joined to this is a table that maps each Location ID to a Region. The measure below works fine when I use a Matrix report and it drills down to Employee ID. If I drill up to Region, then it seems to count every hour of every shift instead of just the shifts that are >= 20 hours. How do I modify my measure to work at the Region level and Employee level?
1 Reply
- Ashish_MathurSuper User
Hi,
To your visual, drag Region from the second table to the row labels. Write this measure:
20+Hr Dollars = CALCULATE(sumx(Filter(Values(Labor[Employee ID]),SUM(Labor[Final Hours])>=20),Labor[Dollars]))
If this measure does not work, then share the download link of your PBI file and show the problem very clearly.