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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.