Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm trying to filter a visualisation to include dates within the last 5 years and blank dates. I've tried creating a measure with an IF statement, but I can't get the syntax right.
Any help is appreciated.
Solved! Go to Solution.
Create the Measure
IncludeDates =
IF(
ISBLANK(MAX('YourTable'[DateColumn])),
1, // Return 1 if the date is blank
IF(
MAX('YourTable'[DateColumn]) >= EDATE(TODAY(), -60),
1, // Return 1 if the date is within the last 5 years
0 // Return 0 otherwise
)
)
Apply the Measure as a Visual Filter
If this helped, a Kudos 👍 or a Solution mark would be awesome! 🎉
Cheers,
Kedar Pande
Connect on LinkedIn
Create the Measure
IncludeDates =
IF(
ISBLANK(MAX('YourTable'[DateColumn])),
1, // Return 1 if the date is blank
IF(
MAX('YourTable'[DateColumn]) >= EDATE(TODAY(), -60),
1, // Return 1 if the date is within the last 5 years
0 // Return 0 otherwise
)
)
Apply the Measure as a Visual Filter
If this helped, a Kudos 👍 or a Solution mark would be awesome! 🎉
Cheers,
Kedar Pande
Connect on LinkedIn
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 |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 48 | |
| 46 |