Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How would I transform column 1 such that blank values are replaced with the value from the preceding row, so rows 266 & 267 would contain "Use Of Fire Evacuation Chai", row 270 "2001 Manual Handling (Indoor), 272 "1251 Cscs - Health And Safety At" etc.
In psudo code it would be something like...
if currentRow.column1.value does not contain data then currentRow.column1.value = precedingRow.column1.value
Solved! Go to Solution.
Ok, Please follow this:
1. Select your column
2. Go to Tranform - Replace Values
Value to Find --- Empty
Replace with ---- null
3. Transform ---Fill Down
Ready
Regards
Victor
@cymorg ,
So your requirement is to refer to previous or next row in power query, right? You can achieve this without adding an addtional index column, please refer to this blog: https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-po...
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In this scenario "In Query Editor with Fill Down Option" does nothing.
Ok, Please follow this:
1. Select your column
2. Go to Tranform - Replace Values
Value to Find --- Empty
Replace with ---- null
3. Transform ---Fill Down
Ready
Regards
Victor
@Vvelarde Victor - So, Transform --- Fill Down creates a Table.FillDown M Query function call. This function acts on the specified column's null values, ignoring non-null values. Therefore, converting empty strings to null before calling this function results in the desired outcome.
It's perfectly clear now thanks to you. 10/10 Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |