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 that contains columns of years. So that I can add some conditional formating these ciolumns I would like to add a custom column that uses an if statement
If current year = column year 1 else 0
How would you suggest I do this in power query.
thank you
RIchard
Solved! Go to Solution.
NewStep=Table.AddColumn(PreviousStepName,"CustomColumnName",each Byte.From(Date.Year(DateTime.LocalNow())=[the colum name of year in previous step table]))
Great works perfect . Thank you for your quick response
NewStep=Table.AddColumn(PreviousStepName,"CustomColumnName",each Byte.From(Date.Year(DateTime.LocalNow())=[the colum name of year in previous step table]))
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 |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 11 | |
| 7 | |
| 6 |