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
Anonymous
Not applicable

Comparing negative numbers in DAX?

Hi, this might be a silly question but I can't figure out how to achieve it.

 

I have a financial table that has a column called "% Decrease" which shows the % decrease of payments. An example value would be "-76%"

 

I want to add a calculated column that says if the percentage is between "-100%" and "-49%" then "Yes" else "No" - what would be the best way to achieve this?

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Go to "Data view">"Modeling">"New Column",then add a dax expression as below:

 

Column = IF('Table'[% Decrease]>-1 &&'Table'[% Decrease]<-0.49,"Yes","No")

 

 

Then you will see:

 

Annotation 2020-01-27 154637.png

 

Best Regards,
Kelly

View solution in original post

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Go to "Data view">"Modeling">"New Column",then add a dax expression as below:

 

Column = IF('Table'[% Decrease]>-1 &&'Table'[% Decrease]<-0.49,"Yes","No")

 

 

Then you will see:

 

Annotation 2020-01-27 154637.png

 

Best Regards,
Kelly

VasTg
Memorable Member
Memorable Member

@Anonymous 

 

Add a custom column as below

 

=if [Column1] <= -0.49 and [Column1] >= -1 then "Yes" else "No"

 

Replace Column1 with your actual column name

 

If this helps, mark it as a solution

Kudos are nice too

 

 

Connect on LinkedIn
FrankAT
Community Champion
Community Champion

Hi,

use the following formula:

If ( Table[% Decrease] >= -1 && Table[% Decrease]  <= -0.49 ; "Yes" ; "No")

 

Regards FrankAT

amitchandak
Super User
Super User

If the column is already in table then create a column. 

 

new column = if(table[% Decrease]>=-100  && table[% Decrease]<=-49,"Yes","No")

 

If the % decrease is a measure create a measure

measure = if([% Decrease]>=-100  && [% Decrease]<=-49,"Yes","No")

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hey,

is the value in the datasource -76% (and thus being a string)
or is it -0.76 and did you use the modeling function in Power BI to make it a percentage?

If the first, you should, and need to model it like -0.76 and use the modeling function to make it a percentage.

If the last, you can create a dax formula looking something like this:

COLUMN = IF(Columnwith-76% > -1 && < -0,49;"yes";"no")

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
Top Kudoed Authors