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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
niyati_61
Helper III
Helper III

Is it possible to get alternate font colors on the values in a column based on another column?

Hello @d_gosbell ,

 

I am currently using Power BI Report Server Desktop (January 2022) Version. 

 

I've created this Pivot Table visual. The Table Name of the below is 'Table C'.

 

% column = CALCULATE(DIVIDE(SUM('Table C'[Value2]), SUM('Table C'[Value]),0), ALLEXCEPT('Table C', 'Table C'[ID]))

 

So basically, as shown in the table below, 

For ID = A, there are 2 categories (10% and 100%), for each category each column has a particular value.

 

In the % column, basically we want to calculate Value2/ Value for both the categories 10% and 100% and show the overall % for this specific ID = A.

The same is shown below,

 

niyati_61_0-1696937492987.png

 

The main question is, in this % column, for ID=A, for both categories the overall % value is 1.13, but as we cannot merge the 2 rows in 1 cell.

 

Is it possible to change font colors of alternate values in this % column? We can base it on the condition that in the % column, if the Category = 10%, we can make the font color 'red' and the other category (100%) font color can be 'blue'. 

 

Is it possible to do the above, and how?

 

Thanks for your support in advance!

1 ACCEPTED SOLUTION

Yes it is. I just set the condition to be rule based using the first value from category field for the current row.

d_gosbell_0-1697061753772.png

 

d_gosbell_1-1697061788658.png

 

View solution in original post

4 REPLIES 4
d_gosbell
Super User
Super User


@niyati_61 wrote:

Is it possible to change font colors of alternate values in this % column? We can base it on the condition that in the % column, if the Category = 10%, we can make the font color 'red' and the other category (100%) font color can be 'blue'. 

 

Is it possible to do the above, and how?

 


Yes this should be possible using conditional formatting. I cannot remember if this functionality was available back in Jan 2022, but if its not you can get it by updating to one of the 2023 releases.

Hi @d_gosbell , thanks for answering!

 

Is it though? I've currently opened Power BI Desktop (April 2023) to test this. 

 

However, in conditional formatting by selecting gradient, rules or field value, I can't make the condition to change the alternate font colors in the Column % based on the Category Column (returning 10% or 100%).

 

niyati_61_0-1697005570321.png

niyati_61_1-1697005686470.png

 

 

Yes it is. I just set the condition to be rule based using the first value from category field for the current row.

d_gosbell_0-1697061753772.png

 

d_gosbell_1-1697061788658.png

 

Hi @d_gosbell , 

 

Yes, you're right. This did work out. 

 

Thank you for your constant support! I appreciate it. 

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.