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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Selecting Prior Date data in a table with Non Contiguous Dates

Hi,

 

I am used to working with Contiguous Dates. We have tables that contain snapshots of a point in time. The table contains the prior day close numbers and the prior month end numbers. 

 

I can get the prior month end just fine without a slicer.

 

I cannot figure out how to incorporate a slicer and pull the prior month end of the selected date.

 

I suspect this is simple and my issue is not knowing what DAX to use. 

 

The data is simple:

 

AR_Snapshot Table DATES_Table
Effective DateAR_Amount CalendarDate
1/29/2019                     10,000 Contiguous Dates 
12/31/2018                       8,000  
11/30/2018                     11,000  
10/31/2018                       7,000  
    
    
Data Expected with Slicer set to 12/31/18 
    
CurrentPrior  
                     8,000.00               11,000.00  
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

You could try to use PREVIOUSMONTH Function to add a measure like this

pre amount = CALCULATE(SUM(Table1[AR_Amount]),PREVIOUSMONTH('Date'[Date]))

Best Regards,

Lin

 

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

View solution in original post

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

You could try to use PREVIOUSMONTH Function to add a measure like this

pre amount = CALCULATE(SUM(Table1[AR_Amount]),PREVIOUSMONTH('Date'[Date]))

Best Regards,

Lin

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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