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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ClaudioL
Helper IV
Helper IV

+ And - sign on cards

Good day,
I am using the type of card "Card with States by OKVIZ" for some dashboards that I create in power bi desktop. In the case of positive values I am showing them in a green color, and in the case of negative values in red. The problem I have is that the company management wants the "+" sign to appear in front of the value in positive values (with green color), since the card appears by default in negative values.
Is there a way to add this "+" sign?
From already thank you very much.

Regards.

2 ACCEPTED SOLUTIONS
OwenAuger
Super User
Super User

Hi @ClaudioL 

 

You can do this by providing a custom number format for the measure/column that you are displaying on the visual.

 

Go to the Model tab, select the colum/measure, and under Formatting choose Format = Custom and enter a format like 

+0;-0;0

(Microsoft documentation page)

 

I tested this with the Card with States visual and it works fine.

 

Regards

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

Tahreem24
Super User
Super User

@ClaudioL ,

Try the below COde:

Measure = IF(SUM(Table[Values])>0,"+","-")
Then use this measure next to your cards. (Adjust it nicely)
And if you want to do color so use the color formattig on above measure.
1.PNG2.PNG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

8 REPLIES 8
Tahreem24
Super User
Super User

@ClaudioL ,

Try the below COde:

Measure = IF(SUM(Table[Values])>0,"+","-")
Then use this measure next to your cards. (Adjust it nicely)
And if you want to do color so use the color formattig on above measure.
1.PNG2.PNG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
OwenAuger
Super User
Super User

Hi @ClaudioL 

 

You can do this by providing a custom number format for the measure/column that you are displaying on the visual.

 

Go to the Model tab, select the colum/measure, and under Formatting choose Format = Custom and enter a format like 

+0;-0;0

(Microsoft documentation page)

 

I tested this with the Card with States visual and it works fine.

 

Regards

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Custom format option is not available for on-premises, so this solution is not correct.

@DmitryKo Interesting. What do you mean by "on-premises" in this case and specifically when have you observed that this doesn't work?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

By "on premises" I mean Power BI Report server. Observed it just now. Power BI Desktop's version for the report server does not provide option for "custom" format for the measure

Interesting...I tried installing the latest version of Power BI Desktop (Report Server version) and was able to change measure format strings, in Measure tools on the ribbon and Model View.

 

Which version of Power BI Desktop RS are you using, and just confirming you're working in a PBIX containing the dataset?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Please fix your signature, it's terrifying. 2/3 of the post space is taken by signature making it completely unreadable

DmitryKo_0-1663162197258.png

 

Version is 2.105.1143.0 (May 2022) which seems to be the latest. Yes, PBIX contains the dataset, it's not offloaded to some tabular storage.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.