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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Calculating start date and end date month wise to calculate rolling revenue

Hi Everyone, 

 

I am facing an issue with creating a dax column formula to calculate no of working days based on start and end date of an employee and segregating it according to each month in 2023.

 

Eg, if A has started working on 01/12/2022 and has an end date of 31/12/2023 - in order to calculate revenue just for 2023 I have added the below formula, to get their revised start date as 01/01/2023.

M Revised Start date = IF(Trial[Start Date]>=Trial[M Alt_Start Date],Trial[Start Date],IF(Trial[Start Date]<Trial[M Alt_Start Date],Trial[M Alt_Start Date]))
In order to get the alternate start date according to the Base month to eventually get rolling networking days for each month, I have put the below formula.
ALT start_date = IF(Trial[Start Date] <= Trial[M Alt_Start Date], STARTOFMONTH(Trial[Start od the month]))
and the result I got is this
VaishnaviGandhi_0-1698850740196.png

However, I am not able do the same or those who have joined sometime this year, 
for example if X has joined on 8th of august then the data in Alt start date should appear as 01/12/2023 against the dec month in Base date, 01/11/2023 against the novel month in base date and so on. Now the revised start date is 8th august then for the month of August it should appear as the actual start date of august and not the start of the month. like the below marked.

I am facing a challenge to express the below formula in a better way to get the result I want in table number 2 and ultimately a combination of Table 1 and Table 2 
ALT start_date = IF(Trial[Start Date] <= Trial[M Alt_Start Date], STARTOFMONTH(Trial[Start od the month]))

 

VaishnaviGandhi_1-1698851495221.png

 

Please suggest
Regards,
VG
1 REPLY 1
Ahmedx
Super User
Super User

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.