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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Histogram plot

Hi Experts 

 

I need to plot the followin histogram as show in the image using the sample data do not have a clue on how to do this...

 

BlueWhite111_0-1670438287665.png

 

sample 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You may first consider creating a new table to cover the range and step.

 

Table =
GENERATESERIES (
    ROUNDUP ( DIVIDE ( MIN ( 'Sheet1'[Value] ), 100 ), 0 ) * 100,
    ROUNDUP ( DIVIDE ( MAX ( 'Sheet1'[Value] ), 100 ), 0 ) * 100,
    50
)

 

Then use it as the x-axis and please new a measure like:

 

Measure = 
VAR _cur = MAX('Table'[Value])
VAR _next = CALCULATE(MIN('Table'[Value]),'Table'[Value]>_cur)
VAR _count = CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Value]>=_cur && 'Sheet1'[Value] <_next)
RETURN
_count

 

And use it as y-axis.

vcgaomsft_0-1670481024778.png

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

You may first consider creating a new table to cover the range and step.

 

Table =
GENERATESERIES (
    ROUNDUP ( DIVIDE ( MIN ( 'Sheet1'[Value] ), 100 ), 0 ) * 100,
    ROUNDUP ( DIVIDE ( MAX ( 'Sheet1'[Value] ), 100 ), 0 ) * 100,
    50
)

 

Then use it as the x-axis and please new a measure like:

 

Measure = 
VAR _cur = MAX('Table'[Value])
VAR _next = CALCULATE(MIN('Table'[Value]),'Table'[Value]>_cur)
VAR _count = CALCULATE(COUNTROWS('Sheet1'),'Sheet1'[Value]>=_cur && 'Sheet1'[Value] <_next)
RETURN
_count

 

And use it as y-axis.

vcgaomsft_0-1670481024778.png

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

Anonymous
Not applicable
nardcox
Frequent Visitor

Might be me, but I can't open your link.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.