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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.