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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
dydx
Frequent Visitor

Change month number used in a measure by a slicer

I have a measure that uses the number of months left in a year for exampe A/(12-current month)

Is it possible have a slicer that changes the current month from (10) for october to whatever month selected, (8) for August?

 

if it is how can i do i go about it?

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@dydx , Not very clear you can have column like this in you date table

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

and you can display in meaure like

 

format(maxx(allselected('Date'), 'Date'[Date]), "MMM-YYYY")

View solution in original post

thank you for the prompt reply, i was able to get the value i wanted using

format(maxx(allselected('Date'), 'Date'[Date]), "M")

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@dydx , Not very clear you can have column like this in you date table

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

 

and you can display in meaure like

 

format(maxx(allselected('Date'), 'Date'[Date]), "MMM-YYYY")

thank you for the prompt reply, i was able to get the value i wanted using

format(maxx(allselected('Date'), 'Date'[Date]), "M")

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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