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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-tangjie-msft
Community Support
Community Support

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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