Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I have a table 'PlanYear' that I need to add a new column to. I need this column to return "Current" if the [PlanYear] column is equal to 2021. I also need this column to return "Prior" if the [PlanYear] column minus 1 is 2020 and return "Historical" if [PlanYear] is anythng else.
I tried to create the column as follows but it didn't work. I know I am close but was hoping to get some help.
Solved! Go to Solution.
@Anonymous change it to
if (year(today())-1=[planyear],"prior"
@Anonymousplease change the formatting of Plan Year column to Integer, it is currently formatted as text
While that fixed the #ERROR...my 2020 row is returning "Historical" instead of "Prior". How should I go about resolving that?
@Anonymous change it to
if (year(today())-1=[planyear],"prior"
Vote for your favorite vizzies from the Power BI World Championship submissions!
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 |
|---|---|
| 56 | |
| 52 | |
| 42 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 107 | |
| 104 | |
| 39 | |
| 35 | |
| 25 |