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
Anonymous
Not applicable

Make negative values return in Parenthesis and Red

Hi Community,

 

I have the challenge of trying to make negative Decimal Numbers and Percentages appear in parenthesis.

 

The measures are calculated measures created in DAX for the Percentages and the other measures are calculated columns which are derived in Power Query.

 

From reading other posts (over a year) relating to the same topic, i see we can use the FORMAT() in DAX, however this will return the data as TEXT which i can imagine will cuase other issues as they are suppose to display as numerical values.

 

Has PBI got this as a functionality which i am unaware of or has anyone found an alterartive solution?

 

Thanks,

 

Laz

 

 

6 REPLIES 6
v-juanli-msft
Community Support
Community Support

After searching and testing, i can't find any other way to make negative values return in Parenthesis and Red without "format" function.

 

My test is as below

Create measure3, 4 based on measure1,2

Measure3 = FORMAT([Measure 1],"#,##0.00;(#,##0.00)") Measure4 = FORMAT([Measure 2],"#,##0.00%;(#,##0.00%)")

Then set conditional formatting for [Measure3] and [Measure4]

6.png

7.png

which issue do this method cause? could you share here so i would try to work out it?

 

For your requirement, you can submit a idea here.

 

Best Regards

Maggie

Anonymous
Not applicable

Hi Maggie,

 

Thanks for your reply on this issue.

 

In my case i want to showcase the Measure3 Positive values as green font color. Can you please provide the solution how to do it.

@Anonymous

 

On the conditional formatting window simply click the add button on the right to add a new line put the values shown on the following image:

 

image.png

Anonymous
Not applicable

Hi Themistoklis,

 

Its Worked for me. Thanks a lot for your quick reply.

 

 

@Anonymous

 

I cant think of a way to change the column header based on expression. But in general you can do it like this:

 

See image below:

image.png

Anonymous
Not applicable

Hi Themistoklis,

 

Its Worked for me. Thanks a lot for your quick reply.

 

I have requirement to customize the matrix column header based on expression in power bi. Can you please let me know the solution.

 

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.