Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Again, something that seems like it should be pretty straightforward for me, but it's not. I have a column "Created date" in my PBI table. There is another column "Original Date" in the table. Some of the rows have "null" in the Original Date column. I need to copy over the "Created Date" from the same row when the "Original Date" shows "null.
I tried replace value in power query, but that doesn't work for what I'm trying to do. Any thoguhts on how I can get this done?
TIA
Solved! Go to Solution.
Hello all. Thank you for the responses. I needed to use the existing column, so I couldn't use any suggestions that created a new column. Eventually what I did was manually entered a step in the applied steps in PQ. = Table.ReplaceValue(#"Reordered Columns",null,each [Created],Replacer.ReplaceValue,{"Original Date"}) That resolved my issue. Thank you all for your help!
Hello all. Thank you for the responses. I needed to use the existing column, so I couldn't use any suggestions that created a new column. Eventually what I did was manually entered a step in the applied steps in PQ. = Table.ReplaceValue(#"Reordered Columns",null,each [Created],Replacer.ReplaceValue,{"Original Date"}) That resolved my issue. Thank you all for your help!
Hi @PowerBINoob24 ,
Thank you for reaching out to the Microsoft Community Forum.
Hi @ryan_mayu , @MasonMA . @Abhilash_P , @Ashish_Mathur , @danextian Thank you for your prompt response.
Hi @PowerBINoob24 , If @ryan_mayu , @MasonMA . @Abhilash_P , @Ashish_Mathur , @danextian Response has resolved your issue. Please mark their response as "Accept as solution", to assist other community members in resolving similar issues more efficiently.
Regards,
Dinesh
In the query editor you can do this:
[Colum1] ?? [Column2]
The DAX equivalent would be
COALESCE ( 'table'[Colum1], 'table'[Column2] )
Both checks whether the first column is blank/null then return the second column else the first column.
Note: should be null or blank. Power BI treats a white space differentently.
Hi,
You can also write this calculated column formula in DAX
=if(Data[Original data])=blank(),Data[Created date],Data[Original data])
Hope this helps.
Hi @PowerBINoob24 ,
You can create a new column in both power query and PBI Desktop
Below is the code for creating in power query
[Original Date] = null then [Created Date] else [Original Date]
Below is the code for creating in PBI desktop using DAX
Final Date =
IF(
ISBLANK('Table'[Original Date]),
'Table'[Created Date],
'Table'[Original Date]
)
Hi, the simpler way would be add one Custom Column with below M, and then remove your 'OriginalDate'
if [OriginalDate] = null then [CreatedDate] else [OriginalDate]
Hope it works:)
you can try to create a new column in PQ
=if [Original Date] is null then [Created Date] else [Original Date]
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
28 | |
26 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |