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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ctaylor
Helper III
Helper III

Display a value as positive but treat calculation as the actual pos/neg value

Hello,

 

I am working on a large set of accounting data where the requirement is to display a pseudo accounting tree.  I have created the hierarchy pathing (Node table) and all my numbers validate out.  What I am looking for help with is a way to display negative numbers as positive but retain the calculation that still treats them as their actual value.

 

In the attachment, all tSum totals are correct, but negative values show (they want to see them all as positive values).  tSum2 is multiplying the value by -1 where the source data says the number should be negated.

 

Is there a way to display all values as positive but treat the underlying value as it's actual positive/negative value so the math works out at the grand total level?

 

image.png

4 REPLIES 4
chikoo
Frequent Visitor

@ctaylor 

I'm looking for similar kind of implemnetation. Were you able to achieve this.

 

Display a value as positive but treat calculation as the actual pos/neg value

TeigeGao
Solution Sage
Solution Sage

Hi @ctaylor ,

You can try to add the IF() function to your measure, IF ([] < 0 , [], -[])

Best Regards,

Teige

@TeigeGao 

 

I am already using an IF to check againt the value of [bNegate] 

 

GL Actual Total = 
CALCULATE(SUMX(
    'General Ledger',
        IF('General Ledger'[bNegate] <> 0, 
        'General Ledger'[Amount] * 'General Ledger'[bNegate], 
        'General Ledger'[Amount]
        )
    ), 'General Ledger'[RecordType] = "R")

The way the data comes in, bNegate is either a 0 or a -1.  So, if the negate flag is raised I am multiplying by -1.  What I am really asking about is whether somehow the value displayed to the user can be masked so that every number displayed is a positive number but the grand total line respect the actual underlying value of the calculation where the negatives are subtracted instead of added because they've been displayed as positive.

 

I am guessing that currently the answer is no, but I just want to explore all bases before I take that answer back to the higher ups in accounting.

 

Thanks!

I have the same situation.  In the matrix below, we want to show Closed Claim as a positive number in the data area but treat that particular value as a negative when calculating the total.  Any solution to this would be great.  I guess for now I'll have to show a negative value for the matrix to sum up properly.

 

image.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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