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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Replace value based in a condition from another column

Dear Friends.

 

I need to replace values in my dataset based in a condition from other column. If the confition is true i want to fill one column if the related value of the condition (same column)

 

Follow an example

 

groupTagname
rg123azurevm1
rg123azurevm1
rg123 vm1-disk
rg123azurevm1
rg123 vm1-olddisk

 

The common values between all columns is the group name, i want to analyze this column and fill the tag column that are blank with the already filled row (azure). so if tag row that are blank, should be filled with the filled tag looking to the group column as condition.

 

i tried some ways, but nothing worked, someone could give me help?

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

I don't know about replacing data, but you could make a new column like this:

 

New Tag = 
  IF(NOT(ISBLANK([Tag])),
    [Tag],
    MAXX(FILTER('Table','Table'[group] = EARLIER('Table'[group])),[Tag])
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

HI Greg,

 

Many thanks for you reply, it worked for me, some row keep blank, but i guess that there is now rows filled in my dataset to use in the RGName, but for the row that have the information, the new column brougth the information.


I would like to understand better the command, could you quikcly explain exaclty what it does?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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