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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
senthil9324
Frequent Visitor

Need help in creating Histogram chart in power BI

Hi Guys,

 

I am new to power BI !!!

I have below data and I want to prepare histogram chart as shown below.

I also like to slice and dice the histogram with filter like week range and segment.

 

 

Order Created TimeWeek RangeDealerSegment
7/25/2018 15:4707/20/2018 - 07/26/2018YC PowerSports ColumbiaPowersports
7/23/2018 20:4807/20/2018 - 07/26/2018Bright PowersportsPowersports
7/23/2018 15:2507/20/2018 - 07/26/2018Bright PowersportsPowersports
7/22/2018 1:4407/20/2018 - 07/26/2018YC PowerSports ColumbiaOther
7/20/2018 16:4107/20/2018 - 07/26/2018Love MotorsportsBoats
7/20/2018 15:2407/20/2018 - 07/26/2018Love MotorsportsBoats
7/19/2018 14:5407/13/2018 - 07/19/2018YC PowerSports ColumbiaOther
7/19/2018 14:5407/13/2018 - 07/19/2018Love MotorsportsBoats
7/18/2018 9:5607/13/2018 - 07/19/2018Wheels in MotionPowersports

 

1.PNG

1 ACCEPTED SOLUTION

Hi senthil9324,

 

You just need to add a calculate column:

Number of Order Created Modified = SWITCH(Table1[Number of Order Created], 1, "1~2", 2, "1~2", 3, "3~")

1.PNG2.PNG 

 

Regards,

Jimmy Tao

View solution in original post

6 REPLIES 6
asitm
Helper III
Helper III

While DAX is a good workaround, it is limited in options- for e.g. changin bin sizes dynamically, using trellis/small multiple, etc.

There are custom visuals on appsource which have these features. The below visual for instance. Though, these are paid visuals and may cost a few dollars per user.

 

https://appsource.microsoft.com/en-us/product/power-bi-visuals/histogramstd

 

asitm_0-1695887386938.png

 

v-yuta-msft
Community Support
Community Support

Hi senthil9324,

 

To achieve your requirement, create two calculate columns using DAX below:

Number of Order Created = CALCULATE(COUNT(Table1[Dealer]), ALLEXCEPT(Table1,Table1[Dealer]))

Number of Dealer = CALCULATE(DISTINCTCOUNT(Table1[Dealer]), ALLEXCEPT(Table1, Table1[Number of Order Created]))

1.PNG  

 

Then create a stack column chart like this:

2.PNG 

 

Regards,

Jimmy Tao

Hi Jimmy,

 

Thanks for the reply.

 

But I want to create histogram bucket wise, like sum of number of dealers falling under 1- 4,5-9,10-19 etc. number of order.

 

Thanks again.

Hi senthil9324,

 

You just need to add a calculate column:

Number of Order Created Modified = SWITCH(Table1[Number of Order Created], 1, "1~2", 2, "1~2", 3, "3~")

1.PNG2.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Hey @senthil9324

 

You easily create a histogram using an R visual. I made a quick video on this here:

 

https://www.youtube.com/watch?v=nePWIVgHobs

 

There are also a couple custom visuals for histograms that you can try.

 

Hope this helps,

Parker

The default R script that runs removes duplicate rows from the data, which defeats the purpose of a histogram.  Any suggestions? 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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