cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Anonymous
Not applicable

## Create a measure that returns the full date of the first day of the following month from 2 slicers

Hello everyone,

.

So in my Report I use two slicers one for the MONTH (1,2,3,4 ....12) and the other one for YEAR (2014, 2015 .... 2020). So I want to create a measure that when I choose the month & year from the slicer it returns the 01st of the following month.

Example

MONTH = 7 (selected from a slicer)

YEAR = 2015 (selected from a slicer)

Measure returns = 01/08/2015 in date format.

EDIT: The correct syntax is :

Measure = EDATE(DATE(SELECTEDVALUE(Slicer[Year], SELECTEDVALUE(Slicer[Month]),1),1)

1 ACCEPTED SOLUTION
Super User

Hi @Anonymous

``````Measure =
DATE ( SELECTEDVALUE ( SlicerT[Year] ), SELECTEDVALUE ( SlicerT[Month] ), 1 )``````

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers

3 REPLIES 3
Super User

Hi,

If the month and year are from the Calendar Table, then try this measure

=max(calendar[Date])+1

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

Hi @Anonymous

``````Measure =
DATE ( SELECTEDVALUE ( SlicerT[Year] ), SELECTEDVALUE ( SlicerT[Month] ), 1 )``````

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers

Anonymous
Not applicable

The correct syntax is:

Measure = EDATE(DATE(SELECTEDVALUE(Slicer[Year], SELECTEDVALUE(Slicer[Month]),1),1)

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Top Solution Authors
Top Kudoed Authors