- Forums
- Get Help with Power BI
- Desktop
- Service
- Report Server
- Integrations with Files and Services
- Mobile Apps
- Developer
- DAX Commands and Tips
- Let's Talk Data
- Custom Visuals Development Discussion
- Community Support
- Community Information
- Community Accounts & Registration
- Using the Community
- Community Feedback
- Training and Consulting
- Dashboard in a Day
- EdX Specific Training Discussion Forum

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Microsoft Power BI Community
- Forums
- Get Help with Power BI
- Desktop
- Reading negative results as positive

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

slackerhx

Regular Visitor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-21-2019
07:16 PM

Hi,

I'm performing a series of calculations to generate a total result and seggregate the total result based on its values as negative, positive or neutral.

However, I come to realise that even though the calculations gave the correct values but the DAX expression is unable to classify the values correctly according to the conditions that i've prescribed.

To illustrate my point:

Total = [Savings A] + [Savings B] + [Savings C]

where [Savings A], [Savings B], [Savings C] are calculated measures on their own.

To classify the total value i've used the following DAX expression:

Outlook = IF([Total]>0,"Savings",IF([Total]=0, "Neutral", IF([Total]<0, "Risks")))

However, some (not all) of the negative results (<0) from [Total] has been classified as "Savings".

I'm not sure why DAX failed to recognise those calculated results as "Risks", appreciate if anyone can enlighten me on this.

Thank you.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

slackerhx

Regular Visitor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-22-2019
12:03 AM

i finally found the issue... not sure if i'm able to explain clearly..

The measure that i was using were dependent on other measures (namely Savings A and B) which required dynamic What-If inputs. Thus, when the seggregation had to be evaluated on a row-by-row context, there isn't any default inputs to replace the What-if inputs. Hence, in a row context, the results cannot be evaluated effectively which makes it problematic when power BI had to classify the data according to the row condition that i've given.

Address | Total (as calculated column) | Total (as calculated measure) | Savings A | Savings B | Savings C |

8 Baker Street | Infinity | 35 | 5 | 10 | 20 |

21 Darling Road | Infinity | 75 | 35 | 40 | 0 |

1 REPLY 1

slackerhx

Regular Visitor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-22-2019
12:03 AM

i finally found the issue... not sure if i'm able to explain clearly..

The measure that i was using were dependent on other measures (namely Savings A and B) which required dynamic What-If inputs. Thus, when the seggregation had to be evaluated on a row-by-row context, there isn't any default inputs to replace the What-if inputs. Hence, in a row context, the results cannot be evaluated effectively which makes it problematic when power BI had to classify the data according to the row condition that i've given.

Address | Total (as calculated column) | Total (as calculated measure) | Savings A | Savings B | Savings C |

8 Baker Street | Infinity | 35 | 5 | 10 | 20 |

21 Darling Road | Infinity | 75 | 35 | 40 | 0 |