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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
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!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.