Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
62 | |
59 | |
56 |