Forum Discussion
Sum of Partially Filtered Data (Highly Complex)
- Anonymous2 years ago
Aylanna I'd have to see the data tables to form a stronger opinion on an approach, but within a measure, can you save in a variable the number of months the employee worked in Org A and use that as the number of months of hours divided by the months of target hours?
- 2 years ago
I got it!!!!
Thanks to all your work, plus a little fine tuning from this vid ... DAX and the Start Date End Date Problem aka Events In Progress (youtube.com)Here is how I have the measure written:
% Capacity =VAR OrgStartDate = FIRSTDATE(HCOrgData[Month])VAR OrgEndDate = LASTDATE(HCOrgData[Month])VAR OrgPeriodHours = CALCULATE(SUM(TASHData[Hours]),TASHData[Timeframe] >= OrgStartDate, TASHData[Timeframe]<=OrgEndDate)Return DIVIDE(OrgPeriodHours, SUM(HCOrgData[Hours/Month]))
Sure! Is there an email that I should use for the access? I want to restrict the link. I redacted out as much as I could and still get you working data.
I just sent you a PM with my email address
- Aylanna2 years agoFrequent Visitor
Great! Thank you. You should have a link in your email with the PBIX file.
- Aylanna2 years agoFrequent Visitor
I got it!!!!
Thanks to all your work, plus a little fine tuning from this vid ... DAX and the Start Date End Date Problem aka Events In Progress (youtube.com)Here is how I have the measure written:
% Capacity =VAR OrgStartDate = FIRSTDATE(HCOrgData[Month])VAR OrgEndDate = LASTDATE(HCOrgData[Month])VAR OrgPeriodHours = CALCULATE(SUM(TASHData[Hours]),TASHData[Timeframe] >= OrgStartDate, TASHData[Timeframe]<=OrgEndDate)Return DIVIDE(OrgPeriodHours, SUM(HCOrgData[Hours/Month]))