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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jmeccles
Helper I
Helper I

Calculated Table Returns a Blank Row

Hey, everyone.

I created a table with no blank rows that looks like this:

 

Table 1

BranchABYearKey
KGN109201710KGN2017
MBY104201710MBY2017
PMR101201710PMR2017
SAV109201710SAV2017
KGN110201711KGN2017
MBY11201711MBY2017
PMR11201711PMR2017
SAV11201711SAV2017
KGN12201712KGN2017
MBY12201712MBY2017
PMR12201712PMR2017
SAV12201712SAV2017
KGN136620171KGN2017
MBY113220171MBY2017
PMR110120171PMR2017
SAV122820171SAV2017
KGN217420172KGN2017
MBY29620172MBY2017
PMR28820172PMR2017
SAV221320172SAV2017
KGN320720173KGN2017
MBY313420173MBY2017
PMR312820173PMR2017
SAV322720173SAV2017
KGN420920174KGN2017
MBY411520174MBY2017
PMR411620174PMR2017
SAV422820174SAV2017
KGN519420175KGN2017
MBY512920175MBY2017
PMR58320175PMR2017
SAV522320175SAV2017
KGN617320176KGN2017
MBY614320176MBY2017
PMR611620176PMR2017
SAV624920176SAV2017
KGN721120177KGN2017
MBY714620177MBY2017
PMR712720177PMR2017
SAV724520177SAV2017
KGN818420178KGN2017
MBY815220178MBY2017
PMR813720178PMR2017
SAV826820178SAV2017
KGN96020179KGN2017
MBY93020179MBY2017
PMR93220179PMR2017
SAV97720179SAV2017


Then I created a calculated table using the following formula:
Table 2 = ALLEXCEPT( 'Table 1', 'Table1'[Branch], 'Table 1'[A] )

Unexpectedly, it returned a table with an extra row which is completely blank - i.e.:


Table 2

BYearKey
36620171KGN2017
17420172KGN2017
20720173KGN2017
20920174KGN2017
19420175KGN2017
17320176KGN2017
21120177KGN2017
18420178KGN2017
6020179KGN2017
9201710KGN2017
0201711KGN2017
0201712KGN2017
10120171PMR2017
8820172PMR2017
12820173PMR2017
11620174PMR2017
8320175PMR2017
11620176PMR2017
12720177PMR2017
13720178PMR2017
3220179PMR2017
1201710PMR2017
0201711PMR2017
0201712PMR2017
13220171MBY2017
9620172MBY2017
13420173MBY2017
11520174MBY2017
12920175MBY2017
14320176MBY2017
14620177MBY2017
15220178MBY2017
3020179MBY2017
4201710MBY2017
0201711MBY2017
0201712MBY2017
22820171SAV2017
21320172SAV2017
22720173SAV2017
22820174SAV2017
22320175SAV2017
24920176SAV2017
24520177SAV2017
26820178SAV2017
7720179SAV2017
9201710SAV2017
0201711SAV2017
0201712SAV2017
 nullnull null 


How can I get rid of this blank row? Is it even possible?

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @jmeccles,

>>Then I created a calculated column using the following formula:Table 2 = ALLEXCEPT( 'Table 1', 'Table1'[Branch], 'Table 1'[A] )

The ALLEXCEPT function can not be used as a calculated column, you created a new table using the formula rather than calculated column by clicking "New Table" under Modeling on Home page.

Please create a new table using the formula below, you will remove the null rows.

Table 2 = FILTER( ALLEXCEPT(Table1,Table1[Branch],Table1[A]),Table1[B]<>BLANK()&&Table1[Year]<>BLANK()&&Table1[Key]<>BLANK())


Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Employee
Employee

Hi @jmeccles,

>>Then I created a calculated column using the following formula:Table 2 = ALLEXCEPT( 'Table 1', 'Table1'[Branch], 'Table 1'[A] )

The ALLEXCEPT function can not be used as a calculated column, you created a new table using the formula rather than calculated column by clicking "New Table" under Modeling on Home page.

Please create a new table using the formula below, you will remove the null rows.

Table 2 = FILTER( ALLEXCEPT(Table1,Table1[Branch],Table1[A]),Table1[B]<>BLANK()&&Table1[Year]<>BLANK()&&Table1[Key]<>BLANK())


Best Regards,
Angelia

Hi there, @v-huizhn-msft!

That was a mistake - I meant that I created a calculated "table", not "column".

Your solution works for me. Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors