Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have a table which looks like this:
Start End Emploee Allocation
1/1/16 1/20/16 A 0.5
1/10/16 2/20/16 B 0.8
1/15/16 2/15/16 A 0.2
What I'm trying to do is show a weekly/daily sum of "Allocation" that can be filtered by "Employee". I am creating a daily date table, but am stuck on how to join it. "Employee" may change and have values added.
I've explored a few ideas but am not that confident in DAX.
Thanks in advance for your help 🙂
Steve
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
Solved! Go to Solution.
So I figured one way, probably not the easiest but:
In a blank query:
set three variables:
start = found first start date
end = last end date
DistinctTable = table with two columns: distinct employee names, the value 1
created a date table with every day between start and end date
added custom column with value of 1
Joined to my variable table DistinctTable on the two columns that equal 1 (returning all employee names as a table on each date)
Expanded column on employee name to give a row for each date and each employee
Then on that table, I calulated column to sum allocation if that date / employee falls correctly
There is probably a better way and would appreciate anyones input!
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
That's a fine solution as long as the performance is OK for you.
For larger datasets you might prefer a DAX-solution: http://community.powerbi.com/t5/Desktop/Count-of-Active-Contracts-by-Start-en-End-date/m-p/94279#M39...
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
So I figured one way, probably not the easiest but:
In a blank query:
set three variables:
start = found first start date
end = last end date
DistinctTable = table with two columns: distinct employee names, the value 1
created a date table with every day between start and end date
added custom column with value of 1
Joined to my variable table DistinctTable on the two columns that equal 1 (returning all employee names as a table on each date)
Expanded column on employee name to give a row for each date and each employee
Then on that table, I calulated column to sum allocation if that date / employee falls correctly
There is probably a better way and would appreciate anyones input!
Did I answer your question? Mark my post as a solution! Proud to be a Super User!
Connect with me!
Stay up to date on
Read my blogs on
That's a fine solution as long as the performance is OK for you.
For larger datasets you might prefer a DAX-solution: http://community.powerbi.com/t5/Desktop/Count-of-Active-Contracts-by-Start-en-End-date/m-p/94279#M39...
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 49 | |
| 44 |