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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Lewdis_
Frequent Visitor

Even out height of bars

I have a dataset sort of like the one below but where i do bars with different type of numbrs. One bar can be sales up to ex 500000 the next one is count with a max of 50 next one is %. This means the first bar is heigh and the next one is almost empty.

 

Is there a good way to build a formula or something giving the values in a different way so that each bar is around the same height no matter it its high or low values from the start. The important thing is that the relation to PY etc is correct

 

Lewdis__0-1728975360397.png

 

1 ACCEPTED SOLUTION
TomasAndersson
Solution Sage
Solution Sage

I would make two measures that normalize the values as CY = 100% and PY = X% of CY, i.e something like 

 

 

 

Normalized CY = 1 //[CY Sales]/[CY Sales] seems redundant to write
Normalized PY Sales = [PY Sales]/[CY Sales] 

 

 

 

Then you could hide the y-axis and instead use data labels of the original CY and PY so users can see the actual amounts

 

You won't see that Biking is larger than Accessories etc without looking at the data labels, but I think it would be more confusing if you somehow made the differences smaller and not to scale. In that case I would have a second visual (where CY Sales only would be enough) as well to get a better feel for how the categories differ. 

View solution in original post

5 REPLIES 5
TomasAndersson
Solution Sage
Solution Sage

I would make two measures that normalize the values as CY = 100% and PY = X% of CY, i.e something like 

 

 

 

Normalized CY = 1 //[CY Sales]/[CY Sales] seems redundant to write
Normalized PY Sales = [PY Sales]/[CY Sales] 

 

 

 

Then you could hide the y-axis and instead use data labels of the original CY and PY so users can see the actual amounts

 

You won't see that Biking is larger than Accessories etc without looking at the data labels, but I think it would be more confusing if you somehow made the differences smaller and not to scale. In that case I would have a second visual (where CY Sales only would be enough) as well to get a better feel for how the categories differ. 

This looks really great, thanks a lot

A logarithmic scale on the y-axis could also be an option. I'm not sure the average business user knows how to interpret that and if it makes sense to have a log scale in this context, but it would be a way to make the columns somewhat more similar in size without all being equal.

Thanks Tomas i tried that but since my data also include negative values i cant enable this 

Ok, but the "normalized" approach should still work in that case. If you want to keep positive CY as positive and vice versa you can add a condition to add *-1 to the normalized value if CY is negative, for example.

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.