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
k3rz0rg
Advocate III
Advocate III

How to return values where other column is not blank?

Hi all,

 

I have a measure in which it returns the sum of revenue where the sale count is not 0 and not blank and tried the following code but I don't think its working. Can somebody help me with that?

 

Measure = SUM([Revenue])
                  ,AND( [Sales Count] <> 0, ISBLANK([Sales Count]) <> FALSE )

Thanks!

2 ACCEPTED SOLUTIONS
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try something like this:

 

Measure = CALCULATE(sum('Table'[Revenue]),not(isblank('Table'[Sales Count])),'Table'[Sales Count]<>0)
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

Hi @DOLEARY85 , 
thanks for the code correction and NOT() was the keyword I was looking for hence I'm marking that as solution! 
Although even the corrected code was not working and was giving me the "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed." error. So I had to put all the condition inside the filter function (thanks to @amitchandak for the filter hint on one of his replies in the community).
FILTER(not(isblank('Table'[Sales Count])),'Table'[Sales Count]<>0))
Thanks again! 

View solution in original post

3 REPLIES 3
mario_ruiz
Helper II
Helper II

Can you see any error when creating this measure? Seems the parenthesis and the order of the arguments is not correct. You should use something like this:

Measure = 
IF (
    [Sales Count] <> 0 && NOT(ISBLANK([Sales Count])),
    SUM([Revenue])
)

 

 

 

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try something like this:

 

Measure = CALCULATE(sum('Table'[Revenue]),not(isblank('Table'[Sales Count])),'Table'[Sales Count]<>0)
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Hi @DOLEARY85 , 
thanks for the code correction and NOT() was the keyword I was looking for hence I'm marking that as solution! 
Although even the corrected code was not working and was giving me the "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed." error. So I had to put all the condition inside the filter function (thanks to @amitchandak for the filter hint on one of his replies in the community).
FILTER(not(isblank('Table'[Sales Count])),'Table'[Sales Count]<>0))
Thanks again! 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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