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

Customized mekko chart

Hello Community,

 

i am searching for a solution. My requirements are a horizontal orientated mekko chart  where i can use conditional formating for the data colors. In following picture you see my first requirement:

timtack_0-1690466274705.png

This picture ist from the xViz-Mekko Chart. However i can't use their chart, because they don't support conditional formatting for the data color. Neither does the mekko chart 3.2.1. from microsoft and their chart is vertical orientated.

The following picture is the staked bar chart in PBI with my individual x-Axis. But i also need that the y-axis with of the bars is conditional on the sales volume to transform it to a mekko chart i need.

timtack_1-1690466696812.png

 

Is there a possibility to build my own mekko chart to fit my requirements? Or is there any other possibility?

3 REPLIES 3
timtack
Frequent Visitor

Thank you very much for your answer! I'll try that now.

 

Is there a possibility to apply a y-axis width for the bars? Because it is important for us to compare the charts intuitively. This is how it looks like at the moment: (all staked bar charts)

timtack_1-1690468095591.png

 

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Power BI does not have a built-in option to directly apply a y-axis width for the bars in a bar chart or column chart. The width of the bars in these charts is automatically determined by the space available on the x-axis and the number of categories.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
AmiraBedh
Most Valuable Professional
Most Valuable Professional

Unfortunately, Power BI doesn't have a built-in option to create a Mekko chart directly, but you can use the following workaround:

Create a new calculated column in your data model to calculate the percentage of each category.

Use the DAX formula to calculate the percentage, like:

[Percentage] = [Value] / SUM([Value])

Now, use the "Percentage" column in your chart instead of the "Value" column. The 100% Stacked Bar Chart will represent the proportions of each category.

To adjust the width of the bars, you can use a stacked column chart instead of a 100% stacked bar chart. Create a new calculated column to calculate the starting point of each category. For example, if you want a bar representing 20% to start at 40% on the x-axis, the formula could be:

 

[StartingPoint] = 40% + SUMX(FILTER('YourTable', 'YourTable'[Category] < EARLIER('YourTable'[Category])), [Percentage])

 

Drag and drop the "StartingPoint" and "Percentage" columns into the Values box of the visualization pane and select the Stacked Column Chart icon from the drop-down list.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

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!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.