Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi
I have a table like this:
| Date | Customer | Sale |
| 1-Mar | C | 200 |
| 5-Apr | A | 100 |
| 6-May | B | 200 |
| 8-Jun | C | 300 |
| 15-Jun | A | 100 |
I want to filter customer that bought in June but did not buy 2 month ago (May bought in March)
I've try this function but it not working
Hi @duongan1602
We can get this in power query,my approach is to generate 2 table,one is customerInJune ,the other is customerInPrevious2Month,then do a merge to filter out the customers InPrevious2Month.
1 .copy the original table ,then filter the date column like this:
2.copy the original table ,then filter the date column like this:
Then merge the two table , we want to filter out the customer in table customerInPrevious2Month
Now the merged table is looks like this :
We can remove the last column .
Best Regards,
Community Support Team _Isabella
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi, thank you for reply. I have read your PBI but not exactly what I need.
I want to filter my table (export new table) to continue calculating data, so i need help to find a function to so my solution.
I do not understand what you want. I have generated my result by writing a measure and have then used that meaure to filter the visual.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 20 | |
| 14 | |
| 13 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 40 | |
| 39 | |
| 38 |