Forum Discussion
PQ Transformation
- 1 year ago
I am not a AI response.
Please try this method which i have tested ...
Reference yourdata to create a new table called "dates"
Remove any rows from "dates" that have nullsThen add a index column
Then do the same kind of thingsto create a "values" tables
So you now have 2 tables
Merge the tables using the index to create another table
Expand the table
Congratultaions ... you have your answer
Merge the tables
It does not work cause if i remove the nulls in Value column, it deletes the row with the dates in Date column...
Thanks for your feedback! If removing nulls in the Value column deletes the rows with dates in the Date column as well, it’s because those date values are only present in the upper rows, and the rest are null.
To fix this, you should first "Fill Down" the Date column so that each row has a date. Then you can filter out the rows where Value is null.
Here’s how:
- Select the Date column in Power Query.
- Go to Transform > Fill > Down.
This will fill the date down into all the null cells. - Now remove the rows where Value is null.
M code example:
FilledDown = Table.FillDown(YourPreviousStep, {"Date"}), Result = Table.SelectRows(FilledDown, each [Value] <> null)
Let me know if you need a more detailed step-by-step!
translation and formatting supported by AI