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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TimoKosonen
Regular Visitor

How to create data to column from existing table

I can get this kind of data. Data contains thousands rows. My need is get to actual factory column to all rows 0008. and other factory.  This is easy to do to those rows where at Production area column, there is KANK term available.

Actual Factory = IF(ISNUMBER(SEARCH("KANK";ZMDWF[Production area];;BLANK()));"0008")

 

but how I can get this 0008 to each rows?

 

Capture.PNG

 

 

 

1 ACCEPTED SOLUTION

Hi @TimoKosonen,

 

So what are the rules? You can add it yourself. Then the [Actual factory] will be filled automatically.

 

Factory =
SWITCH (
    TRUE (),
    ISNUMBER ( SEARCH ( "Kank", 'ZMDWF'[Production area],, BLANK () ) ), "0008",
    ISNUMBER ( SEARCH ( "oth", 'ZMDWF'[Production area],, BLANK () ) ), "0001",
    "9999"
)

 

Best Regards,
Dale

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

View solution in original post

7 REPLIES 7
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @TimoKosonen,

 

There is only one "KANK***" in the data. How can we get "0008" to each row? Which rows? All the rows?

Is there only one condition or requirement? 

Please provide a DUMMY sample file that we can download.

 

 

Best Regards,
Dale

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

Below there is data example. All same SD doc numbers need to be manufactured at same factory.  Hopefully this helps.

Data example is .pbix file. 

 

Power BI data example

 

 

Hi @TimoKosonen,

 

Is the result in the snapshot what you want?

Actual Factory =
CALCULATE ( MIN ( [Factory] ), ALLEXCEPT ( ZMDWF, ZMDWF[SD Doc.] ) )

How_to_create_data_to_column_from_existing_table

Best Regards,
Dale

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

This is partial solution. how I can add other factory?  Please look picture what is need to me,

 

example.PNG

 

 

 

Hi @TimoKosonen,

 

So what are the rules? You can add it yourself. Then the [Actual factory] will be filled automatically.

 

Factory =
SWITCH (
    TRUE (),
    ISNUMBER ( SEARCH ( "Kank", 'ZMDWF'[Production area],, BLANK () ) ), "0008",
    ISNUMBER ( SEARCH ( "oth", 'ZMDWF'[Production area],, BLANK () ) ), "0001",
    "9999"
)

 

Best Regards,
Dale

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

Confusing question.  What exact result do you want.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
PattemManohar
Community Champion
Community Champion

@TimoKosonen Please post the sample data (which is easy to copy and paste) to solve your issue quickly.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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