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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
kasife
Helper V
Helper V

Filter last 3 months

Hi people,

Guys, I'm trying to bring values from the last 3 months into a matrix and for that I used this filter

kasife_1-1692826239179.png

 

I filter the last 2 months and include today because I need the current month, but it is not returning the 3rd month. How can I solve? I need to view the current month + the last 2

 

kasife_0-1692826207647.png  

 

kasife_2-1692826274035.png

 

 

 

15 REPLIES 15
parry2k
Super User
Super User

@kasife check this video on my channel Learn how to compare MTD sales as of date with same number of days last year - Part 7 - YouTube



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k I just watched it but I really don't know how to implement it to get the result I need 

parry2k
Super User
Super User

@kasife here is the output:

 

parry2k_0-1693177735126.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

 

@parry2k  I did as you suggested, but the segmentation transforms period between dates. I need to filter a period by days. For example, from the 1st to the 10th of August, from the 1st to the 10th of July, and from the 1st to the 10th of June. Always the same periods for the last 3 months

kasife_1-1693187600008.png

 

 

parry2k
Super User
Super User

@kasife the reason it is not working is because you didn't mark the calendar table as a date table. Once you do that, everything will work.

 

As a best practice, add a date dimension in your model and use it for time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools. Check the related videos on my YT channel

 

Learn why marking a Date dimension as date table is critical to use DAX Time Intelligence functions ...

Add Date Dimension
Importance of Date Dimension
Time Intelligence Playlist

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@kasife you can share using one drive/google drive.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

toribiolmSXP
Frequent Visitor

Hi Kasife, what are the date values you have in your Date column? if you have there only one day of the month and is not within the filter context created by the 'Last 3 months' filter in your screenshot it wont show any date. i.e. if you have the 20 of each month in that column, the 20.06.2023 won't be included.

 

@toribiolmSXP What I did was use the calendar day in the segmentation

kasife_2-1692886871288.png

Because I would like to select a period, for example, from the 1st to the 23th of each month (last 3 months)

kasife_1-1692886799859.png

I have data on every day of the month.

 

Hi Kasife,

The date filter looks correct so I would start by hovering the mouse on the visual where June 2023 does not show any data and check in the funnel icon on that visual what filters are applied (just in case there is some other filter preventing this data to show).

 

You can also add the day to the visual and review the data in table view, so you can double check what days are included.

parry2k
Super User
Super User

@kasife this is really strange, can you share pbix file, and remove sensitive information before sharing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k I use my computer at work and it doesn't access external links, I just now got a form. I created an account on this platform to share

 

https://ufile.io/s1wux0m8

@parry2k I can't import file here. How could I do this?

parry2k
Super User
Super User

@kasife what happens if you go last 3 months, you see the data?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k @toribiolmSXP Thank you for returning
I noticed that if I put 3 months it calculates the period below

kasife_2-1693015462610.png

I've been testing to put it in days and it seems to have worked, but I'm not sure it can work over the months

kasife_3-1693015635980.png

 

 



kasife_5-1693015735932.png

 

 

HI @parry2k 

 

If I put 3 it doesn't show the last one

kasife_0-1692829041650.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.