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
Hello everybody,
I hope you all are very good!!!
I have a Table with dates, and I want to filter only the last ten days... So I need a filter in my report that shows "Last ten days". What I was doing is a new column in the table with the next formula:
The formula should put "Last 10 days" in all the yellow dates (10 dates), and in the other dates it should put the date.
Any workaround for this?
Thanks a lot. Best regards,
Chema Ortega
Solved! Go to Solution.
A simple formula as below should work
Date Category =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
"Last 10 days",
FORMAT ( 'NexThing Files'[Loaded Date], "dd/mm/yyyy" )
)
Note. if you intend to use the calculated column in a slicer, the values will be sorted alphabetically so the dates will ot be in the correct order. Add another calc column to sort it by.
Date Category Sort =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
1,
'NexThing Files'[Loaded Date]
)
Date Category Sort =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
100000,
'NexThing Files'[Loaded Date]
)
Try to use filter for this visual or page or all pages on filter pane
A simple formula as below should work
Date Category =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
"Last 10 days",
FORMAT ( 'NexThing Files'[Loaded Date], "dd/mm/yyyy" )
)
Note. if you intend to use the calculated column in a slicer, the values will be sorted alphabetically so the dates will ot be in the correct order. Add another calc column to sort it by.
Date Category Sort =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
1,
'NexThing Files'[Loaded Date]
)
Date Category Sort =
IF (
'NexThing Files'[Loaded Date]
>= MAX ( 'NexThing Files'[Loaded Date] ) - 9,
100000,
'NexThing Files'[Loaded Date]
)
Hi Danextian... Thanks a lot! Thats what I needed! That is the solution... that's GREAT! Best regards
Use the below dax:
Loaded Date 5 =
IF(
'NexThing Files'[dataDate] >= (MAX('NexThing Files'[dataDate]) - 9)
&& 'NexThing Files'[dataDate] <= MAX('NexThing Files'[dataDate]),
"Last 10 Days",
FORMAT('NexThing Files'[dataDate], "dd/mm/yyyy")
)
Hi Angith,
Thanks a lot! That also works great! Thanks a lot. Best regard!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |