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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
yashwant101
Helper III
Helper III

Dynamic value in Slicer

Hi all,

 

I have a scenario where I need to calculate months till now of different records.

 

In the below case we need to give one more slicer for months till now for each record:

yashwant101_1-1719834040534.png

 

The months till now will be calculated based on selection in the date slicer (Transaction Date). Tomake a calculation dynamic we need to create a measure, but we will npt be able to put measure in slicer. While we can put columns in slicers but we cannot make it dynamic. 

 

Please let me know if you have any workaround.

 

Regards,

Yashwant

2 REPLIES 2
amitchandak
Super User
Super User

@yashwant101 , Based on what I got so far.  You can join the Transaction date with the date of date table

 

and have measure like

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))

 

You can min date if you need date

 

minx(DATESMTD('Date'[Date]), Date[Date])

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

Thanks for your response, but as per my requirement I need to pull the field in a slicer and we cannot pull measure in a slicer.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.