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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
michellepace
Resolver III
Resolver III

Revenue/Expenses: Data bar for both to run left to right? (Matrix)

Hi,

In my matrix need to visually compare the size of income (positive values) toexpenses (negative values).  Is it possible to conditionally format a column of values so that both positive and negative data bars run from left to right? and I use colour to differentiate as positive or negative).

Thanks as always,
Michelle

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @michellepace ,

You can set the bar direction of Revenue as 'Left to Right' and Expenses as 'Right to left' in the matrix, adjust the colors as your needed.

revenue.pngexpenses.pngresult.png

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @michellepace ,

You can set the bar direction of Revenue as 'Left to Right' and Expenses as 'Right to left' in the matrix, adjust the colors as your needed.

revenue.pngexpenses.pngresult.png

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@michellepace , In case you are not using legend or multiple columns you can do that in the bar using rules or Using a measure with "field" option.

For both case refer: https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

Color measure

color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)

 

for matrix it will work with rows/column etc.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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