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

copying "text" with if statement

Hey guys,

 

I'm trying to create a FTR (First time right).

The table creates "Fout" (False) as the text condition isn't correct.

To put it simple I'm trying to create that the text "Fout" will be copied to all the same 70X-XXX values. 

 

For example in the picture:

- 704-434 -> "Loopactie opruimen" -> "Fout"

- 704-434 -> "Voorbereiden" -> "Fout" (currently returned as a null value)

 

What I need:

- A method to copy the "Fout" text if the conditions are correct

(as one of the 70X-XXX values contains a "Fout" text in the other column.  The other 70X-XXX values with the same numbers should also have the "Fout"

 

aanvullen fout waardes.PNG

 

With Kind regards,

 

SRMulti

1 REPLY 1
AlB
Community Champion
Community Champion

Hi @Anonymous 

You make it difficult to answer your question. You don't specify the names of the columns plus the sample data provided is a screen cap, which can not be copied and thrown into PBI to make a test.

This is a solution in DAX. I f you want it in Power Query please provide sample data in text-tabular format so that it can be copied.

Assuming the column with the 70X-XXX values is called Code and the column with the "Fout" and nulls is called Status, then create a new calculated column in your table (Table1):

New col =
VAR commonStatus_ =
    CALCULATE ( MAX ( Table1[Status] ), ALLEXCEPT ( Table1, Table1[Code] ) )
RETURN
    IF ( ISBLANK ( Table1[Status] ), commonStatus_, Table1[Status] )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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