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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Need to show previous month date based on selected calendar date

Hi,i have two date tables.

1.calendar table

2.order date table

these two are used in slicers.requirement is if i select calendar date like 01-04-2019 then the other slicer of order date slicer should display 01-03-2019 i.e previous month date in order date table.i tried with different ways but i am unable to achieve it.please anyone help me on this.

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Based on your description, you can do some steps as follows.

  1. Create a measure.

 

Measure =

var x1=SELECTEDVALUE('calendar table'[calendar Date])

return

IF(MAX('order date'[order Date])=EDATE(x1,-1),1)

2. Drag the measure to the second “Order slicer” and select “when value equals to 1”.

v-yuaj-msft_0-1610334157806.png

3. Create two slicers.

Result:

v-yuaj-msft_1-1610334157811.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

Thanks for the reply.Here in order date if the values are in 2020 year then its not working.

for eaxmple in calendar date if i select 03-02-2019 and order date should display 03-01-2020.even if the years are different i need to show the previous month irrespective of years.waiting for your solution.

Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for your reply.
Sorry for that it's still not clear. Can you share some sample data and the expected result to have a clear understanding of your question?You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.

 

Best Regards,

Yuna

amitchandak
Super User
Super User

@Anonymous , you will not be able to change a slicer with help from slicer. But if you need measure like this month last month etc you can get.

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors