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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
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.

 

 

Thanks in advance 🙂

 

EDIT: The correct syntax is : 

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

 

 

1 ACCEPTED SOLUTION
AlB
Super User
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 

SU18_powerbi_badge

 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
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
https://www.linkedin.com/in/excelenthusiasts/
AlB
Super User
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 

SU18_powerbi_badge

 

Anonymous
Not applicable

The correct syntax is: 

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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