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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Russell93
Frequent Visitor

Conditional Measure Not Working the way I Imagined - any help greatly appreciated

So I have built a Sales Effciency data model with visuals showing effciency ratios each month of the year. 

 

I had a request to show which stores have shown effciency improvements month-over-month, and which stores have declined in effciency month-over-month. I would like to return a binary conditional where 0 indicates a gain and 1 indicates a decline, to be used for Green and Red color coding respectively on a map visual. 

 

Before I get the Map visual going, I wanted to test my measure in a table view, here is a quick screenshot:

Russell93_0-1689961596392.png

The first three measures in the example table work correctly - I'll paste how to measures are defined below just for reference - but as you can see my Eff MoM Conditional is returnign zeros for all stores but I would like for any stores with a negative MoM Efficiency % Chg to return a 1.

Russell93_1-1689961734696.png

Russell93_2-1689961750727.png

Russell93_3-1689961818465.png

Russell93_4-1689961843262.png

 

My conditional measure is just a simple If Statement, so maybe there is another way I could build that measure to return the results I was expecting. I have played around with this a good deal and would appreciate any insights you may have. Thanks for your time. 

 

1 ACCEPTED SOLUTION

probably it is returning value as a whole number, not in decimal. try dividing with 100. see if that works.

 

Eff MoM Conditional =
IF (
[Efficiency % Chg] / 100 < 0,
1,

)

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

5 REPLIES 5
Russell93
Frequent Visitor

Hello Rubayatyasmin, thanks so much for your reply but I'm afraid that edit is returning the same results (screenshot below). I did consider the percentage --> decimal relationship as DAX reads it, but I figured anything less than 0 as you suggested would work too:

Russell93_0-1689965139074.png

 

probably it is returning value as a whole number, not in decimal. try dividing with 100. see if that works.

 

Eff MoM Conditional =
IF (
[Efficiency % Chg] / 100 < 0,
1,

)

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Thx again for your help, that's a good idea but I'm afraid it didn't change the output either

Russell93_0-1689965789347.png

I also tried using parenthesis to isolate the /100 in terms of order of operations hoping that might work, but no changes:

Russell93_1-1689965942111.png

I will keep researching a solution to this, I think I may have to tell DAX to calculate based on individual Store #'s somehow. Thanks for all of your help

Are you certain that MOM calculation is giving the right value?

 

check the table relationship. 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


rubayatyasmin
Super User
Super User

Your value is in %. That is causing the issue. When dealing with percentage values, keep in mind that they are represented as decimals in DAX calculations. For example, if your "Efficiency % Chg" measure returns a value of 5%, it will be represented as 0.05 in DAX.

 

try using. <0, 1,0

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.