Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Hours Allocation per day based on start and end dates in a row

Hello all, 

 

I'm new to Power BI Desktop, so please excuse the naiveté

 

I am looking to create a Matrix visual from a dynamicly fed (Smartsheet report) table with a date in a Start column and a date in a Finish column, as well as an allocation of hours in a 3rd column.  The Matrix is intended to show how the hours allocation is broken out by day between Start an End date.  Please see examples:

 

This is how the data is fed to Power BI.

Screen Shot 2017-09-22 at 10.04.13 AM.png

 

The idea of the Matrix is below. 

matrix.png With the Start date of 9/28 and the Finish date 9/29, the idea is for that 11 hours allocation in the first row to divide evenly based on the number of work days in between, and place those numbers into the matrix.  in this case,  9/28 = 5.5 & 9/29 = 5.5.  Should that be 4 days long, each day would show that allocation as 2.75 per day.

 

Any help anyone has to accomplish this would be greatly appreciated.

 

Thanks!
TO

28 REPLIES 28

Hi,

 

Please download the revised file from the same link shared above.  It is working fine now.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

i think i am beginning to understand, however, i am unable to see much in the Query Editor.  When I click "edit query", it shows me errors.  see attached shots.   I am unable to work backwards from this to understnad how it was put together.  THank you for trying though!Added Column.pngdateerror.png

Hi @Anonymous

 

Can you let us know what if the dates falls between 09/28/2017 to 10/10/2017.   How do you want to show the result.  There are 2 sets of Satudays and Sundays in between.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

In this case, weekdays only. Weekends should be excluded if possible.

Hi @Anonymous,

 

Let me rephrase the question.

 

1. Date range is 09/28/2017 to 10/10/2017

2. There are three weeks coming in this.

     i)  09/28 and 09/29

   ii)   02/10/  to  06/10

  iii)   09/10  to  10/10

 

3. The number of Days total , excluding Sat and Sun is  - 9.

4. how do you want to show the result

 

is it 09/28 - 1/9, 09/29 - 1/9, 02/10 - 1/9 etc.

 

or 09/28 - 1/2, 09/29- 1/2 , 02/10- 1/5,03/10-1/5,  09/10 -1/2 , 10/10 - 1/2

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

Hello again! If I understand correctly, the second option.
Ashish_Mathur
Super User
Super User

Hi,

 

Please share your data and more importantly show the expected result for the data that you share.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
CahabaData
Memorable Member
Memorable Member

it is unclear as to what data set contains the value 11 and if there is a field in that data set that will link it to the record you display in your first data set example that contains the 2 dates and the 4 value.

 

www.CahabaData.com

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.