cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cocomy Member
Member

How many days so far this month

Hi All,

 

Could you please help me to build fomular for this?

 

I want to have no of days finished each moth.

So it is 18 Mar  today, I want to get 18 in 1 Mar column.

April has not started yet, I want to show zero.  Thank you for your help as always!

 

Month             Days

1 Jan 2018       31

1 Feb 2018       28

1 Mar 2018      18

1 Apr 2018       0

 

All the best,

cocomy

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: How many days so far this month

Highlighted
cocomy Member
Member

Re: How many days so far this month

Zubair_Muhammad,

 

Perfectly worked. Thank you very much for your help!

 

All the best,

cocomy

View solution in original post

3 REPLIES 3
Super User
Super User

Re: How many days so far this month

Hi @cocomy

 

You can try this calculated column

 

days =
VAR MonthEnd =
    EOMONTH ( Table1[Month], 0 )
VAR EndDate =
    IF ( MonthEnd > TODAY (), TODAY (), MonthEnd )
RETURN
    IF ( EndDate > Table1[Month], DATEDIFF ( Table1[Month], EndDate, DAY ) + 1, 0 )
Super User
Super User

Re: How many days so far this month

Highlighted
cocomy Member
Member

Re: How many days so far this month

Zubair_Muhammad,

 

Perfectly worked. Thank you very much for your help!

 

All the best,

cocomy

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 2,188 guests
Please welcome our newest community members: