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
radiator
Frequent Visitor

Populate column by condition (repeating) and text (change of state) from separate columns

Hi everyone,

 

I am having an issue where I can do one thing for an instance and one thing for the duration, but I cannot figure out how to combine it.

 

Basically I want to populate a column if the [Trolig uten fisk]="Nei" and I want those rows to be named based on the [Utsett] text, where one identifies the start of a change of state.

 

radiator_0-1699343301477.png

 

Best regards,

 

Radiator

1 ACCEPTED SOLUTION

Hi Neko Tang,

 

Thank you for the reply, I appreciate it!

 

It did replicate the single value, but it didn't repeat it like I wanted for all the in this case 'yes' columns:

 

radiator_0-1699516169631.png

 

As you can see I did find another way of doing it that is giving the desired results:

 

radiator_1-1699516246108.png

 

Utsett rep = IF(TestAddCol[MedFisk]="yes", CALCULATE(max(TestAddCol[Utsett]), ALLEXCEPT(TestAddCol, TestAddCol[Lokalitet]), TestAddCol[Dato]<=EARLIER(TestAddCol[Dato])))
 
Best regards,
 
Radiator

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @radiator ,

 

You can create a column.

vtangjiemsft_0-1699493710254.png

 

NewColumn =
IF (
    YourTable[Trolig uten fisk] = "Nei",
    YourTable[Utsett],
    BLANK ()
)

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Hi Neko Tang,

 

Thank you for the reply, I appreciate it!

 

It did replicate the single value, but it didn't repeat it like I wanted for all the in this case 'yes' columns:

 

radiator_0-1699516169631.png

 

As you can see I did find another way of doing it that is giving the desired results:

 

radiator_1-1699516246108.png

 

Utsett rep = IF(TestAddCol[MedFisk]="yes", CALCULATE(max(TestAddCol[Utsett]), ALLEXCEPT(TestAddCol, TestAddCol[Lokalitet]), TestAddCol[Dato]<=EARLIER(TestAddCol[Dato])))
 
Best regards,
 
Radiator

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors