Forum Discussion
Get a Count from Measure
- 8 years ago
This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
- 8 years ago
I ended up changing my query quite a bit to get a total per employee per month. Then I added a calculated column to get the sum of points from the last 5 months (including this month). After getting this calc'ed column, I just added another column for the attendance standing i.e. good standing, step 1, etc....When I use this status column, I can now slice and filter by it.
Points 6 Month Total = calculate(sum(tblLeaveMaster[PointTotal]),
Allexcept( tblleavemaster, tblLeaveMaster[Employee Name]),
DATESBETWEEN(
tblLeaveMaster[Date],
Dateadd(lastdate(tblLeaveMaster[Date]), -4, Month),
//Four Month Ago
LastDate(tblLeaveMaster[Date])
)
)
This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
- joshcomputer18 years agoHelper V
I reworked the query to get a monthly summary per employee. What I need now is a calculated column to look at Month/Year and sum the last six months of the Points column. Anyone know how to do that?
Name Month/Year Points Team Name
Jim 7/2018 2 Team A
Mark 7/218 1 Team B
Bill 8/2018 4 Team C
Jim 8/2018 1 Team A
- joshcomputer18 years agoHelper V
I ended up changing my query quite a bit to get a total per employee per month. Then I added a calculated column to get the sum of points from the last 5 months (including this month). After getting this calc'ed column, I just added another column for the attendance standing i.e. good standing, step 1, etc....When I use this status column, I can now slice and filter by it.
Points 6 Month Total = calculate(sum(tblLeaveMaster[PointTotal]),
Allexcept( tblleavemaster, tblLeaveMaster[Employee Name]),
DATESBETWEEN(
tblLeaveMaster[Date],
Dateadd(lastdate(tblLeaveMaster[Date]), -4, Month),
//Four Month Ago
LastDate(tblLeaveMaster[Date])
)
)