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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
anguyen83
Frequent Visitor

Create a filter in an expression so NULL values are being excluded

Hi

 

I just created a new table called LS_Consolidated which comprises of taking columns from 4 other tables and creating 3 columns in the new table.

 

The Timestamp field which is created in the new column now has NULL values (this is because the data from the 4 tables has null values)

 

Expression below

 

LS_Consolidated = Union(SELECTCOLUMNS('Lead',"Stage","TS1","Timestamp",[LS1_Timestamp__c].[Date],"Account_Id",[Id]),SELECTCOLUMNS('Lead',"Stage","TS2","Timestamp",[LS2_Timestamp__c].[Date],"Account_Id",[Id]),SELECTCOLUMNS('Contact',"Stage","TS3","Timestamp",[LS3_Timestamp__c].[Date],"Account_Id",[Id]),SELECTCOLUMNS('Contact',"Stage","TS4","Timestamp",[LS4_Timestamp__c].[Date],"Account_Id",[Id]))

 

 

I would like to incorporate a filter in this expression so that, when the table LS_Consolidated is created null values are filtered and do not get included in LS_Consolidated

 

Hope someone can help

 

Thank you

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @anguyen83,

The filter is used to remove the row where there is null cell in any column, you should add filter in the table rather than column. I list a simple example to filter the table. The first screenshot is my table, I filter the table using the formula and get the second expected result.

Table 2 = CALCULATETABLE(Table1,FILTER(Table1,Table1[Total]<>BLANK()))


1.png2.png

 

So you’d better amend the table in your expression. Replace the ‘Lead’ table as the following table.

New Lead=CALCULATETABLE('Lead',FILTER('Lead',[LS1_Timestamp__c].[Date]<>BLANK()&&"Account_Id"<>BLANK()&&[ID]<>BLANK()))


If you have any question, please let me know.


Best Regards,
Angelia

View solution in original post

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @anguyen83,

The filter is used to remove the row where there is null cell in any column, you should add filter in the table rather than column. I list a simple example to filter the table. The first screenshot is my table, I filter the table using the formula and get the second expected result.

Table 2 = CALCULATETABLE(Table1,FILTER(Table1,Table1[Total]<>BLANK()))


1.png2.png

 

So you’d better amend the table in your expression. Replace the ‘Lead’ table as the following table.

New Lead=CALCULATETABLE('Lead',FILTER('Lead',[LS1_Timestamp__c].[Date]<>BLANK()&&"Account_Id"<>BLANK()&&[ID]<>BLANK()))


If you have any question, please let me know.


Best Regards,
Angelia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors