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
samioberoi
Helper I
Helper I

Getting specific dates out from a date column

Hi,

 

I have a date column giving me the dates as 31 Jan 18, 28 Feb 18, 31 Mar 2018, 30 Apr 18, 31 May 18, 30 jun 18, 31 July 18, 31 Aug 18, 30 Sep 18, 31 Oct 18, 30 Nov 18, 31 Dec 18 and same for 2019 , 2020 and so on. I need some help with just extracting 31 Aug from each year and want to use that in a filter.

 

Can i get some help on this please?

 

Thanks

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @samioberoi ,

 

Try using this logic: filter the date column, month equals 8, day equals 31.

like:

 

FILTER ( 'Table', MONTH ( 'Table'[Date] ) = 8 && DAY ( 'Table'[Date] ) = 31 )

 

or

 

FILTER (
    ALL ( 'Table' ),
    MONTH ( 'Table'[Date] ) = 8
        && DAY ( 'Table'[Date] ) = 31
)

 

If it's a visual filter, create a measure like this:

 

Measure = IF(MONTH(MAX('Table'[Date]))=8&&DAY(MAX('Table'[Date]))=31,1)

 

and configure it like this:

vcgaomsft_0-1674093073768.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I am sure you want to do more than just extractign the date.  What is the larger objective?  Share some data and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-cgao-msft
Community Support
Community Support

Hi @samioberoi ,

 

Try using this logic: filter the date column, month equals 8, day equals 31.

like:

 

FILTER ( 'Table', MONTH ( 'Table'[Date] ) = 8 && DAY ( 'Table'[Date] ) = 31 )

 

or

 

FILTER (
    ALL ( 'Table' ),
    MONTH ( 'Table'[Date] ) = 8
        && DAY ( 'Table'[Date] ) = 31
)

 

If it's a visual filter, create a measure like this:

 

Measure = IF(MONTH(MAX('Table'[Date]))=8&&DAY(MAX('Table'[Date]))=31,1)

 

and configure it like this:

vcgaomsft_0-1674093073768.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

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.