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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to Automate Most Recent Two Months of Invoices in a Matrix

I have a report in which I update monthly to display the most recent 2 months of invoices in a matrix. Currently, I'm doing this by hand in the filter panel, see the picture below. I want to automate this through a DAX measure mostly because I have to do this for 6 different pages. I couldn't get this to work though with my other ranking measure. Any ideas? Link below has the Power BI file.

 

https://drive.google.com/file/d/1TjwEc3EQYvNZ37XizMT4xZmP-eIO_S3_/view?usp=sharing

 

beingandbrian_0-1603977773790.png

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , I think the Rank column on the month can be a good idea.

Month year =  format([Date], "YYYYMM")

Rank COlumn = rankx(all(Table), [Month year])

 

Now you can select 1,2

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors