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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
saivina2920
Post Prodigy
Post Prodigy

NOT ISBLANK not working in DAX expression

I am trying to form the DAX Expression for Pie Chart. But, the count is not coming properly.

below is my table.

 

Below is the expression.

 

Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && NOT ISBLANK ('TEST DATA'[CODE])))
RETURN Total_A
 
Here NOT ISBLANK is not filtering. 
what could be the problem..
The Result of the TOTAL IS : "3".  But,i am getting always 5....
How it is possible...?
 
1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Try :

 

Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && 'TEST DATA'[CODE] <> Blank()))

View solution in original post

3 REPLIES 3
Doflamingo
New Member

Hi,

I really don't understand the answers pointing to the blank function, my PowerBI doesn't recognize this crappy function and null (all lowercase!) works very well.....

 

You can simply compare the column with null....

Example : if [column A]<>null then .... else ....

Respect the case! because with  If, IF, Null, NULL : it doesn't work!

 

Doffy

PC2790
Community Champion
Community Champion

Try :

 

Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && 'TEST DATA'[CODE] <> Blank()))

what would be the condition if only blank instead of <> Blank()

&& 'TEST DATA'[CODE] <> Blank()

&& ISBLANK 'TEST DATA'[CODE]

 

Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && ISBLANK('TEST DATA'[CODE])))

 

Will the above work...?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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