- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
We cannot apply field access to the type Null
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-20-2017 02:02 PM
I need to set a date for some type of data.
Namely when [Nature]="Information", the "End Date" is null and I need to replace that null value by whatever date is in the “Start Date” column.
#"Filtered Rows" = Table.SelectRows(#"Added Delay", each [Nature] <> null and [Nature] <> ""), #"Fixed empty date" = Table.TransformColumns(#"Filtered Rows",{"End Date", each if [Nature]="Information" then [Start Date] else [End Date] })
Unfortunately I’m getting the following error, even though I made sure Nature is never null nor empty
Expression.Error: We cannot apply field access to the type Null.
Details:
Value=
Key=Nature
Any idea what’s going on?
Thanks
Solved! Go to Solution.
Accepted Solutions
Re: We cannot apply field access to the type Null
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-20-2017 03:15 PM - edited 03-20-2017 03:16 PM
With Table.TransformColumns, it is not possible to reference other columns.
Instead, you can add a column with the fixed empty date, then delete the original End Date and rename the new column to End Date (and optionally move it to the original location of End Date).
All Replies
Re: We cannot apply field access to the type Null
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-20-2017 03:15 PM - edited 03-20-2017 03:16 PM
With Table.TransformColumns, it is not possible to reference other columns.
Instead, you can add a column with the fixed empty date, then delete the original End Date and rename the new column to End Date (and optionally move it to the original location of End Date).