cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chillytouch
Frequent Visitor

Custom formatting for totals, or using a metric for totals.

Hi,

 

So I'm a little bit on the newer side with power bi development, and I had a user make a request of a field in a matrix. It's a pretty simple matrix, and there is a field that is basically debits and credits sums. The credits show as a positive number and the debits show as a negative number, and then the power bi automated total shows the correct amount. The problem is that the user does not want the debits to show the negative paranthesis signs. They want to see them as regular positive numbers, which is easy enough to do with custom formatting. However, they still want the total to show up with parenthesis if it's negative because that's a negative location overall. 

 

Is there any way to do this? After searching around I've found no way to do this because you can't custom format the total separate from the column values. 

 

 

I've attached 2 screen shots. The one on the left is how it looks now. The one on the right is how the user wants it formatted.

 pbiss1.pngpbiss2.png

 

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

Hi @Chillytouch ,

Base data:

vluwangmsft_0-1657101434736.png

Then create the below measure:

Measure = IF(HASONEVALUE('Table'[Type]),ABS(MAX('Table'[value])),format(SUM('Table'[value]), "#,###  ; (#,###)"))

 

Output result:

vluwangmsft_1-1657101474030.png

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Chillytouch ,

Base data:

vluwangmsft_0-1657101434736.png

Then create the below measure:

Measure = IF(HASONEVALUE('Table'[Type]),ABS(MAX('Table'[value])),format(SUM('Table'[value]), "#,###  ; (#,###)"))

 

Output result:

vluwangmsft_1-1657101474030.png

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@Chillytouch , you can use isinscope or isfiltered and you can change measure formatting, but that can make it a text datatype

 

 

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!