Forum Discussion

New2PowerBI's avatar
New2PowerBI
Helper III
9 years ago
Solved

How to Join Two Columns Into One Based on Data Values

I have a dilemma in my Tables and Columns. We manage preventative work in an application and I'm working with that data. I notice that when the preventative work is tied to an "Asset", the "Location" column in the Asset Table is populated, however, if the preventative work is not tied to an "Asset", the "Location" column in the Asset Table is NOT populated, but IT IS populated in a "Location" column, from the Preventative Maintenance (PM) Table. Here is a visual representation of what I see:

 

LOCATIONLOCATIONPMNUMROUTEDESCRIPTIONASSETNUMCSTM_IMPLEMENTERFREQUENCYFREQUNITNEXTDATE
DIV.POOL.VEHC.01 STX65642 VEHICLE STATE REGISTRATION / INSPECTION - DIV - ANNUALVEHC19992SHIROCKW1YEARS3/18/2018 0:00
PS.SUN.TANK.01.LS.01 STX22701 BREAKOUT TANKS - OVERFILL PROTECTION - SUN - ANNUALLS20739FONTESD1YEARS3/17/2018 0:00
PS.SUN.TANK.02.LS.01 STX22702 BREAKOUT TANKS - OVERFILL PROTECTION - SUN - ANNUALLS20740FONTESD1YEARS3/17/2018 0:00
PS.SUN.PT.02 STX23211 OPSD INSP - ELECTRICAL - SUN - ANNUALPT66735FONTESD1YEARS3/17/2018 0:00
PS.SUN.UPS.01 STX68897 UPS ELECTRICAL INSP - SUN - ANNUALUPS28764FONTESD1YEARS3/17/2018 0:00
PS.SUN.HS.01 STX69913 STATION PROTECTIVE DEVICE - SUN - ANNUALHS19769FONTESD1YEARS3/17/2018 0:00
PS.SUN.PT.01 STX76853 OPSD INSP - ELECTRICAL - SUN - ANNUALPT25924FONTESD1YEARS3/17/2018 0:00
PS.SUN.PT.03 STX76854 OPSD INSP - ELECTRICAL - SUN - ANNUALPT25925FONTESD1YEARS3/17/2018 0:00
 PS.SUNSTX78624 ANNUAL ELECTRICAL INSPECTION - SUNFIELD PUMP STATION FONTESD1YEARS3/17/2018 0:00
 PS.SUNSTX79539STX2086LEVEL MEASUREMENT - SUN - ANNUAL FONTESD1YEARS3/17/2018 0:00
 INJ.PNNBSTX78662 ANNUAL ELECTRICAL INSPECTION - PATTON NORTH BATTERY OSORIOM1YEARS3/16/2018 0:00

 

I want to build a "cleaner" report...the end user doesn't understand how this works and essentially wants just "one location" value.  What they would like to do is see the report and essentially show everything at "PS.SUN" and get a list of that information displayed.  They don't really care if tied to an asset or not, it's all work at that "main site".  How do I get this to work?  Totally lost here; any help will be greatly appreciated. 

9 Replies