Forum Discussion
Histogram custom bins
Hi everyone, I am new to power bi and I am stuck. I need to create time spent bins for a histogram. How should I create bins like >2, 2-4, 4-6 , 6-8... Etc. Please help its urgent....
You see that I have already added the time spent for session using the calculate formula. Which is as follows:
Calculate(Sum(VW_GRoupScoreP4(MinutesSpent),AllExcept(VW_GroupScoreP4,VW_GRoupScoreP4(SessionID)).
I hope this formula is correct to find total time spent in each session.
Hi, Kumar11109
There will be a menu when you click “1”, choose “New Group”, then you can see scene “6”. Let Group type be “Bin”, then choose Bin size as 2. As you can see the data in “5”, all the data group by 2 or whatever you want (>2, 2-4, 4-6 , 6-8).
Ps: 1. The axis and the value are the same column “Total Time Spent”.2. Reference: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-grouping-and-binning/
15 Replies
- v-jiascu-msftMicrosoft Employee
Hi, Kumar11109
There will be a menu when you click “1”, choose “New Group”, then you can see scene “6”. Let Group type be “Bin”, then choose Bin size as 2. As you can see the data in “5”, all the data group by 2 or whatever you want (>2, 2-4, 4-6 , 6-8).
Ps: 1. The axis and the value are the same column “Total Time Spent”.2. Reference: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-grouping-and-binning/
- Kumar11109Helper IV
What are groups ??
- v-jiascu-msftMicrosoft Employee
Hi, Kumar11109
Don't you want to create bins? Bins is a kind of group. Such as 0-2, 2-4, 4-6... You can see the "Group Type" is "Bin". If not so, please clarify your needs. Like what the histogram is.
- Kumar11109Helper IV
I used this method only to create groups. But rather than doing it in the same table that had all the data, I created another table using the function "Summarise". That helped me get only the data that I required for the table. Then method worked. Remember I wanted time spent for each session, and my original table had multiple values consisted of multiple values as each session consisted of multiple resources being watched in a session. I created another table with session id with total time spent on all the resources being watched in that specific session.
Thank You,
Dale
- v-jiascu-msftMicrosoft Employee
- v-jiascu-msftMicrosoft Employee
Hi,
Could you share your method here please? That would be very helpful to others.
Best Regards!
Dale
- asitmHelper III
I believe the free Microsoft visual is not available anymore. Though there are other custom visuals available for Histogram in appsource now, and those have the options to customize bin easily. Some paid and some free, but the free ones have more limitations.
https://appsource.microsoft.com/en-us/product/power-bi-visuals/histogramstd