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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cocomy
Resolver I
Resolver I

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

Zubair_Muhammad,

 

Perfectly worked. Thank you very much for your help!

 

All the best,

cocomy

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

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 )

Regards
Zubair

Please try my custom visuals

@cocomy

 

Dayssofar.png


Regards
Zubair

Please try my custom visuals

Zubair_Muhammad,

 

Perfectly worked. Thank you very much for your help!

 

All the best,

cocomy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.