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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Rnaval
Helper V
Helper V

Need Help creating new columns

 
1 ACCEPTED SOLUTION
mariussve1
Super User
Super User

Hi,

For the OS Type you can use:

OS Type = IF ( CONTAINSSTRING( '11936 Master'[OS], "Server"), "Server", "Workstation" )

For the OS Name you can use:
OS Name =
    SWITCH(
        TRUE(),
        CONTAINSSTRING( '11936 Master'[OS], "Windows"), "Windows",
        CONTAINSSTRING( '11936 Master'[OS], "Linux "), "Linux ",
        "Other"
    )

Hope this helps, and please accept my answer as solution if this helps 🙂

Br
Marius
BI Fabrikken
www.bifabrikken.no

View solution in original post

3 REPLIES 3
mariussve1
Super User
Super User

Hi,

For the OS Type you can use:

OS Type = IF ( CONTAINSSTRING( '11936 Master'[OS], "Server"), "Server", "Workstation" )

For the OS Name you can use:
OS Name =
    SWITCH(
        TRUE(),
        CONTAINSSTRING( '11936 Master'[OS], "Windows"), "Windows",
        CONTAINSSTRING( '11936 Master'[OS], "Linux "), "Linux ",
        "Other"
    )

Hope this helps, and please accept my answer as solution if this helps 🙂

Br
Marius
BI Fabrikken
www.bifabrikken.no

Thank You

Rnaval
Helper V
Helper V

I would like to know how I can create new columns based on an existing value in a column - OS (Operating System). I would like to create a new 'OS Type' column which will contain either Server or Workstation as values - this will be based on whether the 'OS' field contains the word 'Server' in it's value. 

 

And then another column which will have either Windows, LInux or Other as values.

 

Here are my source pbix and data files

 

Rnaval_0-1739737609170.png

 

https://www.dropbox.com/scl/fi/pufugkcw1wf2xchifxn8x/VM.pbix?rlkey=tnzrlcamwtj13cq22gj9pp74x&st=d76x...

 

https://www.dropbox.com/scl/fi/cbdd4d890cdtd7dpob141/Tenable-Extract.xlsx?rlkey=6dsa1z2x9e42pcb8ics0...

 

https://www.dropbox.com/scl/fi/jj1i45n3ucozi7u47mck2/38689-Master.xlsm?rlkey=ctgegjg0d7vspbhnaxkahjn...

 

https://www.dropbox.com/scl/fi/bwz36t9yas2n91t11wvib/19506-Master.xlsm?rlkey=s4zohvv6ji7tpbv3ls9w3sz...

 

https://www.dropbox.com/scl/fi/pj3vcwt1n2fn48kdhst9e/11936-Master.xlsm?rlkey=xq2n01o6b8rnsymv9dp3dje...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors