cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
adityapv
Helper II
Helper II

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
v-yuaj-msft
Community Support
Community Support

Hi @adityapv ,

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.

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.

Hi @adityapv ,

 

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

@adityapv , 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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors