Forum Discussion
How to update value in current row column based on the another row column value condition in Mquery
Hi,
I am new into power bi.
How can we update value in current row column based on the another row column value condition in Mquery.
Actual Table
| ID | MainAccount | MappingID |
| 1 | R001 | |
| 2 | 1 | |
| 3 | R003 | |
| 4 | 3 | |
| 5 | R005 | |
| 6 | R006 | |
| 7 | 5 |
Here I want to update the MainAccount value to the MainAccount column based on the Mapping ID
Expected Table.
| ID | MainAccount | MappingID |
| 1 | R001 | |
| 2 | R001 | 1 |
| 3 | R003 | |
| 4 | R003 | 3 |
| 5 | R005 | |
| 6 | R006 | |
| 7 | R005 | 5 |
Please advise.
Thanks
Vinoth S
4 Replies
- v-xicai
Community Support
Hi,
You can create column or measure like DAX below
Expected_Column = IF(Table1[MainAccount]<>BLANK(),Table1[MainAccount],CONCATENATE("R00",Table1[MappingID])) Expected_Measure = IF(MAX(Table1[MainAccount])<>BLANK(),MAX(Table1[MainAccount]),CONCATENATE("R00",MAX(Table1[MappingID])))Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Vinothsusai
Helper III
Hi,
Thank you for your reply.
Is it possible to achieve this in query editor.
Thanks
Vinoth SUSAINATHAN
- v-xicai
Community Support
Hi Vinothsusai ,
Sorry, I can't figure out how to achieve it in query editor. Maybe someone others can have a try.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- vijayxkumarNew Member
Transform->Fill->Down in power query