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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rob_mysbxsec
Helper II
Helper II

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
Greg_Deckler
Super User
Super User

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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