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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.