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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Replace value based on duplicate column with priority

Hi all,

 

I am currently trying to proccess some raw data into our budget.

 

I have refined it down as far as i can and as far as i need however as new data gets added i need to replace the old.

 

The movements are a PO can be APPR from there it will move to CLOSE or CANC. However it wil have a new status date when this status changes from APPR. I need to keep the original status date as this is the months budget this will be coming from, but update the status to CLOSE/CANC. From here if the status is CANC i will filter it out of results.

 

I have attached a photo for reference.Untitled.jpg

 

Is this possible through Power Query?

1 REPLY 1
ImkeF
Community Champion
Community Champion

Everytime you refresh a query, all "existing" data will be overwritten by the new data, unless you use the incremental refresh feature in Power BI Premium. 

If you have that or found a way to feed in your historical data as well with the new refresh, you can then group on PO and add a conditional column that checks for existing statuses within the group and adds the fields to filter by.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors