Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi Experts
I need a calculated column to add to the date table to show if the date including current month is in the last 24 months then 1 else 0. the relative date filter is not working on committed date, but works on date date. if that makes any sense.
Solved! Go to Solution.
Hi @blestone111 ,
I create a table as you mentioned.
Then I create a new calculated column. Here is the DAX code.
Column =
IF (
DATEDIFF ( 'Table'[Date], TODAY (), MONTH ) <= 24
&& DATEDIFF ( 'Table'[Date], TODAY (), MONTH ) >= 0,
1,
0
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @blestone111 ,
I create a table as you mentioned.
Then I create a new calculated column. Here is the DAX code.
Column =
IF (
DATEDIFF ( 'Table'[Date], TODAY (), MONTH ) <= 24
&& DATEDIFF ( 'Table'[Date], TODAY (), MONTH ) >= 0,
1,
0
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 48 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 119 | |
| 116 | |
| 38 | |
| 36 | |
| 27 |