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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SloeMo
Frequent Visitor

Conditional formatting Text count based as a % on the column total

Hi,

 

Apologies for posting this but I am having issues with conditional formatting text, I have tried reading variuous threads but cannot get my head into gear.

 

I have a text column called KRI Category, this contains values FP, IM, PS, Support. Within a matrix I can show a count of the values which are correct. I can add the same field to show the value as a % of the grand total. this also shows the correct %.

 

But how can I set conditional formatting to show metrics based upon the values in the matrix? I have tried rules based on number as decimal and numbers as a % and it is not correct.

 

SloeMo_0-1662733688737.png

Do I need to add a calcluated column or a measure to transform my text to a numeric value?

1 ACCEPTED SOLUTION

@SloeMo No, not because it is text because you have the Count aggregation. But, what you need to be using is the %GT of Count of KRI Category. Of course, you probably don't have that available in the conditional formatting stuff. But, you could create a measure like:

GT % Measure = 
  VAR __Count = COUNT('Table'[Count of KRI Category)
  VAR __AllCount = COUNTX(ALL('Table'),[Count of KRI Category])
RETURN
  DIVIDE(__Count,__AllCount,0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
SloeMo
Frequent Visitor

@Greg_Deckler 

 

Thanks so much, has worked perfectly. Knew I was missing something.

Lee

Greg_Deckler
Community Champion
Community Champion

@SloeMo You should be using the Number dropdown and not Percent. Should be something like if > 0 and <= .45 and > .45 and <= 1

Or something like that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thanks @Greg_Deckler 

 

I had tried that previously based on other threads but these are the results.

 

SloeMo_1-1662735835253.png

Am I doing something wrong in the format, it looks like as I am using number as a rule nothing actually falls into the rule parameter as the actual lowest count in the data is 2. I need it work from a % as the numbers will change.

 

Didn't know if this is because the column is text?

 

Thanks

Lee

@SloeMo No, not because it is text because you have the Count aggregation. But, what you need to be using is the %GT of Count of KRI Category. Of course, you probably don't have that available in the conditional formatting stuff. But, you could create a measure like:

GT % Measure = 
  VAR __Count = COUNT('Table'[Count of KRI Category)
  VAR __AllCount = COUNTX(ALL('Table'),[Count of KRI Category])
RETURN
  DIVIDE(__Count,__AllCount,0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors