cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

power bi for pretty histograms

I'm doing some work where folks are typically using R and/or Python for creating visuals.  In those environments creating a histogram for any given column of data is as simple as the following: 

    R = hist(mydataframe$somecolumn)

    Python = mydataframe.somecolumn.plot.hist(); plt.show()

 

My interest is to create the histograms i need to generate in power bi given i find the environment much more approachable when it comes to making the visuals pretty.

 

The issue i'm finding is that dragging any column onto power bi report surface and changing visual to one of the column [ / histogram ] visual options only presents statistical summarization options in the Value field drop down, e.g. Sum, Count, Median. It doesn't provide a "Don't Summarize" option like you get with X/Y Axis field drop downs in the case of a Scatter chart.  I tried using "Count (Distinct)" which i'd expect should produce the desired histogram / frequency chart result but it did not.

 

I found some article suggesting i go off into query editor and for every histogram / frequency chart column value i wanted to create a visual for create a new query property of the form "= Table.Group(Source, {"somecolumn"}, {{"count", each Table.RowCount(_), type number}})" which i did and can use that count property to get a histogram / frequency chart view but wierdly i have to select Sum, Average, Min, Max, Median in the Column values drop down summarize options since again there is no "Don't Summarize" option.

 

So i'm thinking I really must be overlooking something obvious here given creating a histogram / frequency chart for any given column value should be a no brainer in power bi right. Any hints as to what i'm doing wrong?

 

 

 

1 REPLY 1
Highlighted
Super User IV
Super User IV

You could just use an R Visual and use that exact R code pretty much.

 

Can you post some sample data and maybe an example of what you are trying to accomplish. You do get a Don't Summarize option for certain visuals like Tables, etc. but not for bar/column charts for numeric values. I'm not exactly sure what you are trying to accomplish by using a bar/column chart without some form of aggregation.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors