Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everybody I am newbie with DAX.
I have a vacation table, with startdate, enddate and employee id. I need to calculate no of days in each month(if start date and endate are two different months)
for example
id start_date end_date
10 17/05/2023 12/06/2023
I need to know howmany days in may and june separately
Any help would be much appreciated. Thanks all!
Solved! Go to Solution.
Hi,
Please find attached my PBI file.
Hope this helps.
hey , is it possible to get no of days in each month between startdate and enddate, as a new column in the same table?
No, it is not. If the start and end dates span multiple months then one rows for each day should be created. You cannot create a row in a Table.
if there is multiple months like the screenshot i shared, of diiferent employees (startdate and enddate of vactaion taken of each employee)how do i get no of days in each month
The only way i am aware of is to transform the data in the Query Editor (I have already shared that file with you)
Total_Days=DateDiff(Min(Start_Date) , Max(End_Date),Day)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |