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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Efforts Allocation Weekly

Hi,

 

I have the following sample data with me, 

 

EffortsStart_dateDue_date
51/1/20201/7/2020
101/1/20201/8/2020
151/1/20201/16/2020
201/1/20201/14/2020

 

Efforts - Represents quantified work that needs to be done 

Start_date: Gives the date when that work starts off 

Due_date: gives the date by within the work needs to be completed. 

 

Now, I need to split this efforts weekly like below on PowerBI (Expectation is to derive those columns represented in BOLD and its values) 

 

EffortsStart_dateDue_DateNoOfWeeksWeek Number1Week Number 2Week Number 3
51/1/20201/6/202015  
101/1/20201/7/2020110  
151/1/20201/8/202027.57.5 
201/1/20201/14/202021010 
91/1/20201/16/20203333

 

 Calculation of Week is based on the logic of (7 days representing one week) 

 

Week Number1January 1 - January 7
Week Number 2January 8 - January 14
Week Number 3January 15 - January 21

 

By taking few assistance over the community, there was an attempt made but it is resulting upon Error: 

Some data to experiment and worked out PBIX file is here : https://1drv.ms/u/s!AmnSr2uYQLNPcwP8_U-R-mJV-K8?e=kzDne3 

 

The splitted efforts in week number are giving me error, if you could see the PBIX i have shared. The logic written may seem to fail because of the data i have over cross years. 

 

My data has 2019,2020 and 2021 efforts list. Could this be a reason? If so can someone help me fixing it? 

 

If there is any other alternate approach can be shared will also be applicable. 

 

Note: The data shared on (Sample_data_1.csv) can have data of 2019, 2020, 2021. But currently what I am looking for is to have the efforts splitted for the entries that falls in 2020. (Week 1 - Week 53 of the year 2020) . 

 

Thanks,

Govind

 

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Your fnWeeknumber needs a date type parameter, but your two date columns are date/time type.

And you could use IF() to return 2020/01/01 or 2020/12/31 if data is out of the calendar range.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

@v-eachen-msft :  Would you mind explaining the IF () function to a more detailed level? I am not really sure where this needs to be plugged in. 

 

Thanks,

Govind

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors