Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hiya,
I have a set of data, with dates from yesterday to the past. I want to exclude the the day before yesterday and 9 days after this, so filter out this middle 10 days? How do I action this?
Cheers
Solved! Go to Solution.
Hi @Sam7
Please write a Calculated Column with DAX function like
Today date is 18.10.2023, so I made range of date as False
Column = SWITCH(
TRUE(),
'Table'[Date] = TODAY()-1,"False",
'Table'[Date] > TODAY()-11,"False",
"True")
Then filter out your VIsual or Page with True or False value
You can write similar code in M Power Query
If solve your requirement, please mark as SOLUTION and give LIKE
Proud to be a Super User! | |
Thank you
Hi @Sam7 ,
You can create a custom column to filter.
=if [Date]>=Date.AddDays(DateTime.Date(DateTime.LocalNow()),-2) and [Date]<=Date.AddDays(DateTime.Date(DateTime.LocalNow()),7) then 1 else 0
Filter out 1, filter the middle 10 days.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sam7
Please write a Calculated Column with DAX function like
Today date is 18.10.2023, so I made range of date as False
Column = SWITCH(
TRUE(),
'Table'[Date] = TODAY()-1,"False",
'Table'[Date] > TODAY()-11,"False",
"True")
Then filter out your VIsual or Page with True or False value
You can write similar code in M Power Query
If solve your requirement, please mark as SOLUTION and give LIKE
Proud to be a Super User! | |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 3 |