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

Decimal condition in DAX

I want to add a condition in dax where [columnname] is either less than 0 or equal to 0 or equal to 0.0 or equal to 0.00.

 

Please suggest!

1 ACCEPTED SOLUTION

Wrapping it in INT() should have the same effect on a numeric column.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

4 REPLIES 4
kentyler
Solution Sage
Solution Sage

The only way you can display a number like 0.0 is if it is in a text column, other wise it will display as 0.

I made a small sample that has the values you are asking about in a text column. I added a calculated column to test if they were greater than zero (1 = true, 0 = false).

In order to do the "greater than" operation I had to use the INT() function to convert the test values to integers
GreaterThanZero_11252019.png

Hope that answers your question. 
I'm a personal Power BI trainer. 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


kentyler
Solution Sage
Solution Sage

Is the column a text column or a numeric column ?





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Anonymous
Not applicable

It's a numeric column.

Wrapping it in INT() should have the same effect on a numeric column.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


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.