Forum Discussion
vishal140197
2 years agoFrequent Visitor
Power Query Updating a row
I am trying to do this in Power BI. Whether DAX or Power Query anything would be useful. I have 2 columns one is 'Date' and the other is 'Version Number'. I want to update the dates where 'Version ...
ChiragGarg2512
2 years agoSolution Sage
vishal140197 share a sample data in tabular form.
vishal140197
2 years agoFrequent Visitor
| Project Number | Date | Version Number |
| 1234 | Version_1 | |
| 12345 | 01/01/2021 | Version_1 |
| 1234 | Version_1 | |
| 1234 | 20/11/2022 | Version_2 |
| 1234 | 20/11/2022 | Version_2 |
| 1234 | 20/11/2022 | Version_2 |
| 1234 | Version_1 | |
| 1234 | 21/11/2022 | Version_3 |
| 1234 | 21/11/2022 | Version_5 |
| 12345 | 21/11/2022 | Version_2 |
| 1234 | 21/11/2022 | Version_4 |
- AlienSx2 years agoSuper User
let Source = your_table, fx_v2_date = (tbl as table) as table => [v2_date = Table.SelectRows(tbl, each [Version Number] = "Version_2"){0}[Date]?, v1_change = Table.ReplaceValue( tbl, each [Version Number], v2_date, (v, o, n) => if v = null and o = "Version_1" then n else v, {"Date"} )][v1_change], group = Table.Group( Source, {"Project Number"}, {{"all", fx_v2_date}} ), expand = Table.ExpandTableColumn(group, "all", {"Date", "Version Number"}) in expand