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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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