Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
I have a report that I succeeded in filtering based on a date column that has a date older than 5 years from today:
The expression inside "Value" is:
=DateAdd(DateInterval.Year, -5, NOW())
I need now to define in the expression, instead of today date, the end of the actual year (and even, in onother filter, the start of the actual year.
Thanks for any help.
Solved! Go to Solution.
Hi @IlMoro ,
Below is my table:
The following Expression might work for you:
DateDiff("yyyy",Format(Fields!Date.Value,"Long Date"),Now())
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , it is not clear for me what I have to do.
I have just a dataset containing assets details and a column that contains the purchase date (dd/mm/yyyy).
I need to filter the dataset so it show just those assets having a purchase date that is 5 years old from the end of the current year.
Hi @IlMoro ,
Below is my table:
The following Expression might work for you:
DateDiff("yyyy",Format(Fields!Date.Value,"Long Date"),Now())
The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
79 | |
42 | |
40 | |
35 |