Forum Discussion
Rnaval
1 year agoPost Partisan
Need Help creating new columns
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 🙂
3 Replies
- RnavalPost Partisan
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
- mariussve1Solution Sage
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 🙂- RnavalPost Partisan
Thank You