- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How to convert "Present" value text to Current Year?
Hi, I need help...
How to convert "Present" value text to Current Year using Custom Column?
Table Example:
StartYear | EndYear | ConvertedEndYear |
2022 | Present | 2023 |
2020 | 2021 | 2021 |
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Do a Replace Values on the column and replace "Present" with any text (e.g., "A"). Then update the step expression in the formula bar, replacing "A" with Text.From(Date.Year(DateTime.LocalNow())). Below is an example you can put in a blank query to see how it works.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIyMDKAUIZKsTrRSk4wjo5SQFFqcWpeiVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, StartYear = _t, EndYear = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Item", type text}, {"StartYear", Int64.Type}, {"EndYear", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","Present",Text.From(Date.Year(DateTime.LocalNow())),Replacer.ReplaceText,{"EndYear"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value",{{"EndYear", Int64.Type}})
in
#"Changed Type1"
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Do a Replace Values on the column and replace "Present" with any text (e.g., "A"). Then update the step expression in the formula bar, replacing "A" with Text.From(Date.Year(DateTime.LocalNow())). Below is an example you can put in a blank query to see how it works.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIyMDKAUIZKsTrRSk4wjo5SQFFqcWpeiVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, StartYear = _t, EndYear = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Item", type text}, {"StartYear", Int64.Type}, {"EndYear", type text}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","Present",Text.From(Date.Year(DateTime.LocalNow())),Replacer.ReplaceText,{"EndYear"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value",{{"EndYear", Int64.Type}})
in
#"Changed Type1"
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much!

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

User | Count |
---|---|
14 | |
9 | |
8 | |
7 | |
7 |
User | Count |
---|---|
13 | |
11 | |
9 | |
6 | |
6 |