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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fazikp2
Frequent Visitor

Different conditional formatting for revenues and expenses

Hi there,

 

I have financial dashboard showing income statement with revenues (as positive numbers) and expenses (as negative numbers). Then I have comparison of YTD actuals vs budget and vs LY. I am using matrix visual.

 

I want to show to the users positive deviations as green and negative deviations as red. However in case of revenues increase is good = green, while for expenses increase is bad = red.

 

Example

revenues 15 vs 10 => change = +50% (shoul be green)

expenses -15 vs -10 => change = +50% (should be red)

 

Any advice on the best way to do this?

 

Thanks,

P

 

1 ACCEPTED SOLUTION

@fazikp2 solution with idea is attached, you can tweak it as per your need

 

basically created a calculated column to identify line item if it is income or expense 

added a measure called Highlight to put color condition.

used conditional formatting using above measure 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@fazikp2 you can use rule based conditional formatting for both the fields and decided whatever color you want. Here is the post to rule based conditional formatting.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

Thanks, however I am not sure, if I can achieve what's needed with what you are suggesting.

 

Could you give an example how to achieve result similar to this?

 

Capture.PNG

 

 

Dellis81
Continued Contributor
Continued Contributor

I'm searching for same solution. But, have a suspicion we will have to have a way to compare back against ledger type.

@fazikp2 can you share sample pbix file and I can get you the solution. You can share using onedrive/google drive



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k: Attached is link to the dummy file. I have provided also screenshot with the desired outcome.

 

Thanks.

 

Dummy Pbix file:

https://drive.google.com/file/d/1yJFiO5EGv6basCNOKlcfJZHPdaAswzeI/view?usp=sharing

 

Desired outcome:

- desired conditional formatting is show below in "vs LY(%)" column, to sum it up:

- increase in revenue type line should be highlighted green / decrease in revenue line should be highlighted red

- increase in expense type line should be highlighted red / decrease in expense line should be highlighted green

Capture.PNG

@fazikp2 solution with idea is attached, you can tweak it as per your need

 

basically created a calculated column to identify line item if it is income or expense 

added a measure called Highlight to put color condition.

used conditional formatting using above measure 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thanks a lot. That was exactly what I was after. Appreciate your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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