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
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
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.