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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi I have a datetable, that haddles years that dont run calendat year. The year start 01/04/2020 for this year and I have a coumn called RailYear. I would like to create a new calculated column that will show how many years ago that row is
so for today 26/06/2020 years ago is 0
26/06/2019 years ago is 1
at the moment I have hardcoded the caluclated column so railyear - 2020 this works fine.
I have created a table current rail year that hold one value 2020, can I write a dax query that retrieves this value? I have no realtionship between the tables ?
I am looking to use this value on a clustered graph so the the legend will dynamically change colour so each year ago is a certain colour.
thanks in advance
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |