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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX statement error

I am trying to write a DAX statement something like :  

CALCULATE(SUM(table name[column name]),(table name[column name]) = "C", "C","O"). It is showing me error that "The true/false expression does not specify a column. Each true/false expression used as a table filter expression must refer to exactly one column".
 
Any help is really appericated. 
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Your filter expression is incorrect. As mentioned in the error message,each true/false expression used as a table filter expression must refer to exactly one column.

You can add filter like below:

Measure = CALCULATE(SUM('table name'[column name]),('table name'[column name]) in { "C", "O"})

 

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

CALCULATE(SUM(table name[column name]),table name[column name]) = "C"||table name[column name]) = "O")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Your filter expression is incorrect. As mentioned in the error message,each true/false expression used as a table filter expression must refer to exactly one column.

You can add filter like below:

Measure = CALCULATE(SUM('table name'[column name]),('table name'[column name]) in { "C", "O"})

 

Best Regards,
Community Support Team _ Eason

ribisht17
Super User
Super User

@Anonymous 

 

CALCULATE(SUM(table name[column name]),(table name[column name]) = "C", "C","O")

 

Can you explain what is the condition here?

ribisht17
Super User
Super User

@Anonymous 

 

Please refer to this post >>Solved: True/False expression doesn't specify a column - Microsoft Power BI Community

 

When you get this problem, you could check if your CALCULATE() formula has a direct TRUE/FALSE filter. You need use a FILTER() formula to surround the TRUE/FALSE condition.

 

Regards,

Ritesh

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.