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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
rpatel-cct
New Member

AutoFill Blank Cells

Hi All, 

 

Wondering if the following is possible:  In my data set I have 2 columns, Unit and SubUnit.  Within each Unit are multiple SubUnits (ex. Unit 2000 - 2001, 2002, 2003.. as SubUnits).  

There are instances where within a Unit there is no listed subunit. When that happens, the SubUnit cell is blank. I was wondering if there was a way to put in a formula or script that would detect the blank, and copy over the Unit value into the Subunit (ex. Unit 2300 - blank Subunit... would want to copy over 2300 into the Subunit as well)

 

Here is a sample of my data:

UnitSubUnit
20002001
20002001
20002002
20002004
2300 
22002201
22002203
2300 
2300 
20002003
2400 
22002202
22002201
2400 
22002205

 

Any help/guidance is very much appreciated!

Thanks,

RP

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @rpatel-cct ,

 

To create a calculated column as below.

U = IF(ISBLANK('Table'[SubUnit]),'Table'[Unit],'Table'[SubUnit])

Capture.PNG

 

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

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @rpatel-cct ,

 

To create a calculated column as below.

U = IF(ISBLANK('Table'[SubUnit]),'Table'[Unit],'Table'[SubUnit])

Capture.PNG

 

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

Thank you so much!

Anonymous
Not applicable

Since the  blanks will be null when you import that, the easiest thing would to be create a new column with the following and then deleting the original SubUnit

=if
[SubUnit] = null
then
[Unit]
else
[SubUnit])

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 MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors