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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Manjarigoyal1
Frequent Visitor

Compare, Replace values based on Condition

I have this table  shown below. I want to group by Site and if SFID is blank for Status Active and SFID is populated for Deselect then the values of SFID, task and Workflow needs to move from row 3 to row 2.

 

Original Data 

SnoSiteStatusSFIDTypeTaskWorkFlow
1Site AnullnullSwift  
2Site AActivenullSwift  
3Site ADeselect2929194Retain2INSTALL
4Site BnullnullSwift  
5Site BActivenullSwift  
6Site BDeselect2928855Retain2INSTALL
7Site CActive1234567Retain2INSTALL
8Site DActive1235668Swift2INSTALL
9Site DDeselect1235639Retain2DAS
10Site DActive1278537BH2GUP

 

Result should look like this as below

SnoSiteStatusSFIDTypeTaskWorkFlow
1Site AnullnullSwift  
2Site AActive2929194Swift2INSTALL
3Site ADeselectnullRetain  
4Site BnullnullSwift  
5Site BActive2928855Swift2INSTALL
6Site BDeselectnullRetain  
7Site CActive1234567Retain2INSTALL
8Site DActive1235668Swift2INSTALL
9Site DDeselect1235639Retain2DAS
10Site DActive1278537BH2GUP

 

Any help is appreciated.

 

Thanks

1 ACCEPTED SOLUTION
Manjarigoyal1
Frequent Visitor

I found the solution. This video tells exactly what I was looking for.

 

Refer to Previous Row for Subgroups in Power Query - YouTube

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Manjarigoyal1 ,

Glad your problem is solved!

 

If you have no other problems, would you mind accept your reply as solution? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

 

Best Regards,
Community Support Team _ kalyj

Manjarigoyal1
Frequent Visitor

I found the solution. This video tells exactly what I was looking for.

 

Refer to Previous Row for Subgroups in Power Query - YouTube

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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