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
Hi guys,
I have the data with the period of the last 10 weeks' performance.
However, I only wanna display the last 5 weeks' by creating a filter with the script as in the photo.
Yet it shows some errors. Any suggestion for this?
Thanks!
Solved! Go to Solution.
Hi @snamhoang,
Your formula shows some errors, because you create a measure rather than calculated column. You should create a calculated column which will used to filter your report as @Phil_Seamark posted.
Best Regards,
Angelia
Hi @snamhoang,
Your formula shows some errors, because you create a measure rather than calculated column. You should create a calculated column which will used to filter your report as @Phil_Seamark posted.
Best Regards,
Angelia
Hi @snamhoang,
If you have a calendar/date table, you could add this column to it
Weeks From Today = IFERROR( DATEDIFF('Dates'[Date],TODAY(),WEEK),-1)Then you can include it in your Page, Report or Visual level filter to show where the value is >0 and < 5
This gives you the flexibility to choose different ranges.
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 |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 110 | |
| 91 | |
| 55 | |
| 45 |