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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

DAX expression error

Can somebody please help with below mentioned error?

 

dax error.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I can't see the data and don't know your data but try without the filter like:

CALCULATE(COUNT([DocumentID]),[ownsalestaxid]="")

 

Let me know the outcome.

 

BR,

DR

View solution in original post

12 REPLIES 12
mader
Frequent Visitor

Hi. 

Verify if all of the columns you are comparing to "" are with data type Text. 

If you do not wish to change data type then the logic of comparing to blank should be changed. 

Consider using ISBLANK(<value>) 

Anonymous
Not applicable

Hi @Anonymous,

 

That would be your comparisons with "". For what I can see (can't know your fields types) but you have to substitute "" by >0 or blank() when you compare numeric fields and leave the "" for the text.

 

Let me know if it worked and if so mark as solution.

 

BR,

DR

Anonymous
Not applicable

This is still now working. Data type of ownsalestxid is text.

 

dax error2.PNG

Anonymous
Not applicable

and I am creating a measure here.

Anonymous
Not applicable

What should the card visual show and do you have some sample data?

 

Anonymous
Not applicable

The card visual should show the no of documents where ownsalestaxid is blank.

Anonymous
Not applicable

In that case you could just use;

 

Measure = COUNTBLANK('BOT Output'[ownsalestaxid])
 
Or am i thinking too simple here? This works in my test file.
Anonymous
Not applicable

Probably would actually.

 

BR,

DR

Hi. 
What values are actually calculated on those bad cases ?

 

 shot_191125_145842.png

Anonymous
Not applicable

I can't see the data and don't know your data but try without the filter like:

CALCULATE(COUNT([DocumentID]),[ownsalestaxid]="")

 

Let me know the outcome.

 

BR,

DR

Anonymous
Not applicable

This doesn't work without selecting table name.

 

Mandatory fields missing = CALCULATE(COUNT('BOT Output'[Document ID]); 'BOT Output'[ownsalestaxid] = "" )
 
column [ownsalestaxid] is of type text.
Anonymous
Not applicable

One of the columns used is a number format, and others are text. As stated in the error you can use the value or format function to make it to text in this expression.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.