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
vimina
Frequent Visitor

Condition format one measure based on another measure

Hi,

I am wondering if there is any way to condition format one measure based on another.
Attaching pbix file for reference: https://drive.google.com/file/d/1uPF5RgDhz9V9UTsmBI86pKyDcVuoONka/view?usp=sharing

vimina_0-1682769915558.png

I need to create one measure which displays the total sales and average sales with the enclosed text(The highlighted area contains two seperate measure). Also need to condition format total sales measure based on average sales.
for eg: if total sales is greater than average sales, then font color of total sales should be green color else red color, the font color of average will remain in grey color always (This need not to be changed based on condition).


Any help will be appreciated.

Thanks You.

1 ACCEPTED SOLUTION
vimina
Frequent Visitor

I have found the solution using text box. I used two measure with switch statement to generate the value based on condition and formated the font color accordinly. 
Note: the hidden icon will dissapear once published online

vimina_0-1683025778218.png

Reference: QT#75 - Add Conditional Formatting to Values INSIDE a Power BI TEXT BOX - YouTube

View solution in original post

2 REPLIES 2
vimina
Frequent Visitor

I have found the solution using text box. I used two measure with switch statement to generate the value based on condition and formated the font color accordinly. 
Note: the hidden icon will dissapear once published online

vimina_0-1683025778218.png

Reference: QT#75 - Add Conditional Formatting to Values INSIDE a Power BI TEXT BOX - YouTube

Ahmedx
Super User
Super User

Is this what you are looking for

https://1drv.ms/u/s!AiUZ0Ws7G26Rh2JGXuss8VxHCsJq?e=ifqrX6

 

 

Screen Capture #997.pngScreen Capture #998.pngScreen Capture #999.pngScreen Capture #1000.pngScreen Capture #1001.pngScreen Capture #1002.pngScreen Capture #1003.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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