Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Vinothsusai
Helper III
Helper III

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

 

IDMainAccountMappingID
1R001 
2 1
3R003 
4 3
5R005 
6R006 
7 5

 

Here I want to update the MainAccount value to the MainAccount column based on the Mapping ID

Expected Table.

IDMainAccountMappingID
1R001 
2R0011
3R003 
4R0033
5R005 
6R006 
7R0055

 

Please advise.

 

Thanks

Vinoth S

4 REPLIES 4
vijayxkumar
New Member

Transform->Fill->Down in power query

v-xicai
Community Support
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])))

 

4.png

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi,

Thank you for your reply.

Is it possible to achieve this in query editor.

 

 

Thanks

Vinoth SUSAINATHAN

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.