This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello there,
I am calculating employee retention and I need to change the null values in isActive column to be "false" if there's an end date which means the employee left, and "true" if end date is null which means the employee is still active.
this is the code I am using:
#"Replaced Value" = Table.ReplaceValue(#"Replaced OTH",each [isActive],each if [End Date] is null then "true" else [isActive],Replacer.ReplaceValue,{"isActive"})
but it doesn't seem to work.
Any tips?
Solved! Go to Solution.
Hi @salgouda ,
if you enter an equal sign just at the start, the formula should work.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @salgouda ,
if you enter an equal sign just at the start, the formula should work.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @salgouda ,
the syntax looks correct. But the screenshot you have posted doesn't match your formula (-"...Copy" columns).
Otherwise: What does the error message says or what exactly is wrong with the current result you are getting?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF
the original columns are just named isActive, and End Date
When I try to add a new custom step to write this code nothing happens!
it seems like I am missing something but can't figure out what is it?
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 61 | |
| 31 | |
| 31 | |
| 23 |