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
rosscortb
Post Patron
Post Patron

Fill blanks in column with a value based on a condition

Hello

 

I have a column called position group which contains some values and some blanks

Also have a column called role level with some values and no blanks

 

For only the blanks in position group I want to replace with that employees value in role level.

 

So would be something like, 

IF('Spans & Layers'[Position Group] = "" , replace with values of 
'Spans & Layers'[SP Role Level], matching 
'Spans & Layers'[Employee ID]
 
 
I realise I may need to do this in query editor.
Thanks
Ross
1 ACCEPTED SOLUTION

@rosscortb , You can have a new column like

Column = COALESCE([Position Group],[Role Level])
Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@rosscortb ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Thanks Link 

 

So, only the blanks in position group should be replaced with that employees value in role level. If position group already as a value then ignore.

@rosscortb , You can have a new column like

Column = COALESCE([Position Group],[Role Level])
Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak That  seemed to work for my demo i sent but not my live?

role.PNG

got it i need to go into the excel file select the blanks and delete the cell, might have been a space or something hidden in it. thanks

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.