Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |