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
luisClive
Helper III
Helper III

How to Display as negative Number (after dividing two negative values)?

Dear Friends

 

question

 

How to Display as negative Number (after dividing two negative values)?

.. prefeable in brackets

 

Iam talking about "how to" display only , because if I use any " if conditions" the values change

5 REPLIES 5
v-yangliu-msft
Community Support
Community Support

Hi  @luisClive  ,

According to your description, I create this data:

v-yangliu-msft_0-1616139689192.png

Here are the steps you can follow:

1. Create measure.

Column1 =
var _1=
IF('Table'[amount1]<0&&'Table'[amount2]<0,
-1*DIVIDE('Table'[amount1],'Table'[amount2]),
DIVIDE('Table'[amount1],'Table'[amount2]))
return
"("&_1&")"

2. Result.

v-yangliu-msft_1-1616139689199.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Singaravelu_R
Resolver III
Resolver III

create calcuate columns 

divide_value = -(DIVIDE('Table (2)'[column1],'Table (2)'[column2],0))
bracket = "("
bracket 2 = ")"
Column 4 = CONCATENATE('Table (2)'[bracket],'Table (2)'[divide_value])
column5 = CONCATENATE('Table (2)'[Column 4],'Table (2)'[bracket 2])

Singaravelu_R_0-1615966500783.png

 

Singaravelu_R_0-1615966707961.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.