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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Pikachu-Power
Impactful Individual
Impactful Individual

Compact Histogram

Hello everyone,

 

Maybe someone can give me an idea how to create a compact histogram in Power BI like following:

 

1.PNG

 

I have a lot of consumption values which i assign to different categories like

 

and so on...

-5.0 to -2.5 Percent

-2.5 to 0 Percent

0 to 2.5 Percent

2.5 to 5.0 Percent

and so on...

 

When I use this categories for the x-axis i get something like that:

 

 1.PNG

 

Two difficulties:

- Sorting because the categories are in type text 

- It is not compact and i have to scroll because there are to many categories

 

The sorting problem i could maybe solve by creating a new column with numbers and assign to the categories. But how can i represent the categories without scrolling at the end? I dont see a possibility to move the columns together. Maybe there are appropriate visuals to do things like that? 

 

Many thanks for ideas.

 

5 REPLIES 5
Pikachu-Power
Impactful Individual
Impactful Individual

Hi @Anonymous 

many thanks for your response. I was thinking about python. Are there some suitable / helpful sides with python codes for histograms? Otherwise i will search.

Anonymous
Not applicable

Hi @Pikachu-Power ,

Here:
Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn
Using Python Visuals in Power BI - AbsentData
Histograms — Matplotlib 3.8.2 documentation

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

I have 222,000 rows in my dataset. Does the limitation of 150,000 rows are also valid for histogram?? 

 

When i try bar plot my calculation exceeds five minutes and run into time out. But for histogram it seems to work and i get no message. So i dont know if there is a mistake in my results.

Anonymous
Not applicable

Hi @Pikachu-Power ,

I've done some testing and can't seem to get rid of the column chart gaps.

Consider use some custom visuals:
Business Apps – Microsoft AppSource
Templates | Deneb (deneb-viz.github.io)
Example Gallery | Vega-Lite
Histogram Example | Vega

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

saudansari
Helper II
Helper II

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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