Format result in PowerBI

I have an excel that is formatted such that negative numbers are in red in color and in brackets and one decimal place as shown below


I have been trying to replicate in Powerbi by going to the formatting options but i dont seem to get through

image. I even tried the EDNA option https://www.youtube.com/watch?v=QlvvoF_xDtY but i dont know why its not working

Can someone explain

Hi @wilford.mitchell

Check out the Dax workout 001. I tried the new formatting that is preview mode but likely will go into regular mode soon. I put in the my posting a video that explained it great.
Also @BrianJ also put in a link also what he did also.

DAX Workout 001 - Dynamic Format Strings - Workouts / DAX - Enterprise DNA Forum

@BrianJ link below.

DAX Workout 001 - Dynamic Format Strings - Workouts / DAX - Enterprise DNA Forum

I hope this helps.
Keith

Hi @Keith,

Thanks for your help. I did tried that but it still didn’t work

sorry, I’m not sure what you are doing wrong. Try using Chatgpt or youtube video to search for it.

I’m thinking its not recogniizing your measure

Hi @wilford.mitchell , to help the forum members further analyze your current state and visualize your issue, could you please provide as many as you can of:

• Your work-in-progress PBIX file, using sanitized data if necessary
here’s @BrianJ’s YouTube video on how to anonymize data in a Power BI file: https://www.youtube.com/watch?v=VmWD7Ayw_NI
• Your dataset as an Excel file (again, sanitized if necessary)
• A detailed mock-up (marked-up screenshot of the visual in question or Excel file) showing your desired outcome.

Also, what is the Power BI Desktop version and number that you are developing upon?

I guess a thing to remember is that this is still in Preview. Features, user experiences, and documentation are subject to change. We are all learning together.

Hi @wilford.mitchell

You can format negative values as red and in brackets using a 2-step process:

(1) for each field, use the “Format” box in the toolbar and enter the desired string [e.g., #; (#)]
(2) for each field, add conditional formatting using “rules” and set values below 0 to, say, red and values above zero to, say, black


Hope this helps.
Greg
eDNA Forum - Formatted Negative Values.pbix (19.7 KB)

1 Like

Hello @wilford.mitchell

Did the responses above help solve your query?

If not, can you let us know where you’re stuck and what additional assistance you need?

If it did, please mark the answer as the SOLUTION by clicking the three dots beside Reply and then tick the check box beside SOLUTION

Thank you

@Greg ,

Thanks so much for this.

Sorry for another ask, How do i make the blank values as a dash like in the excel

this is what i have now in powerbi.

HI @wilford.mitchell. There are 3 parts to the format string: positive, negative, and zero. Adjust as desired (say [#; (#); -]).
Greg

1 Like