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
ruta
Frequent Visitor

Getting second biggest date

Hi all,

Hi all,

 

I am trying to sum a column(bad debt reserve) of the second largest date ( previous month). But I am not sure how to correctly filter out the date. I tried creating a sepearate date column that would contain the original date -1( smaller by one month), however, dateadd function did not work as it only returned values for some months and other were blank.

LastMonthBD = CALCULATE(SUM('As of 6 30 2019'[Bad Debt Reserve (USD)]), FILTER(ALL('As of 6 30 2019'[As of Date] , 'As of 6 30 2019'[As of Date] = MAX(Dateadd('As of 6 30 2019'[As of Date],-1,MONTH)))))

Any help is appreciated!

 

1 REPLY 1
Anonymous
Not applicable

Again... You should learn about the proper design of models first. If you don't, well, you will not know how to do your calculations in the simplest way possible and will be scratching your head constantly, which will frustrate you more and more each day.

 

Here's something to get you started with time intelligence in Power BI:

 

https://www.youtube.com/watch?v=kmZlNMA0_SM

 

Best

Darek

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.

Top Solution Authors