cancel
Showing results for
Did you mean:
Frequent Visitor

## time analysis

i have a start date and an end date, and i am trying to count how many days in each month, have each period, i use DATEDIFF, but this just give me the days for 1 month

in example, the start date is 04/may
the end date is 04/july
and i want to know how many days have the period in may and in july.

hope someone can help me.

thank you

10 REPLIES 10
Super User

## Re: time analysis

Proud to be a Datanaut! Appreciate your Kudos
Feel free to email me with any of your BI needs.

Frequent Visitor

## Re: time analysis

thanks for your reply, but if i  just put day, the result is the days in the time period but i need (in the example) the number of days in may and in july, not the total

Super User

## Re: time analysis

@MarcoLopez oh in this case you want to know total number of day in may and in june so which will be 31 days for may and 30 days for june, total 61, is this what you are after?

Proud to be a Datanaut! Appreciate your Kudos
Feel free to email me with any of your BI needs.

Frequent Visitor

## Re: time analysis

yes, thats what im looking for.
thank you

Super User

## Re: time analysis

@MarcoLopez you can add a column something like this

```Total Days =
DAY( EOMONTH( Table2[Start], 0 ) )  + DAY( EOMONTH( Table2[End], 0 ) )```

Proud to be a Datanaut! Appreciate your Kudos
Feel free to email me with any of your BI needs.

Frequent Visitor

## Re: time analysis

@parry2k thank you, that works for the total days, but didnt  give me the days for each month, I am trying creating columns for each month but i dont get to the correct result

Super User

## Re: time analysis

```Days for Start Month =
DAY( EOMONTH( Table2[Start], 0 ) )

Days for End Month =
DAY( EOMONTH( Table2[End], 0 ) )```

Proud to be a Datanaut! Appreciate your Kudos
Feel free to email me with any of your BI needs.

Frequent Visitor

## Re: time analysis

@parry2k it didnt work, the expression didnt allow me to select the date column

Super User

## Re: time analysis

@MarcoLopez not sure why, can you share sample data?

Proud to be a Datanaut! Appreciate your Kudos
Feel free to email me with any of your BI needs.

Announcements

#### Back to School Contest

Engage and empower students with Power BI!

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Top Kudoed Authors
Users Online
Currently online: 293 members 3,070 guests
Recent signins: