Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
How do I create a Rolling 12 Month flag as a column in my table to filter values, the equivalent in SQL being ...
=DATEADD(month, -12, GETDATE())
The furthest I can get is IF(Table[Date] >= DATEADD(TODAY(),-12,MONTH), "Yes", "No"), however DATEADD requires a column, is there a way to do this without adding a column for today?
Thanks,
Solved! Go to Solution.
@Anonymous
You can add a custom column for same day previous 12 months ago in Query Editor.
Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-12)
Then you can create the tag column with IF statement.
if [Date] > Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-12) then "Yes" else "No"
Regards,
@Anonymous
You can add a custom column for same day previous 12 months ago in Query Editor.
Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-12)
Then you can create the tag column with IF statement.
if [Date] > Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-12) then "Yes" else "No"
Regards,
Hi,
I think you need something like this - If(DATEDIFF(Table1[date],TODAY(),MONTH)<=12,1,0)
P
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |