Forum Discussion
Create a Distribution chart by bucketizing a measure
- 2 years ago
Hi Anonymous
I created a bucket table with 3 columns: Bucket (ie. 0-10), Min(0) and Max (10) for each bucket.
I wrote 1 measure.
Count = COUNTROWS( FILTER( ALL( 'Table' ), 'Table'[Average (days)] >= SELECTEDVALUE( 'Buckets'[Min] ) && 'Table'[Average (days)] <= SELECTEDVALUE( 'Buckets'[Max] ) ) )The ALL() might have to be changed to ALLSELECTED() depending on your needs.
Let me know if you have any questions.
Create a Distribution chart by bucketizing a measure.pbix
Anonymous
cant you create the average as calculated column in your table .
then use the create group builtin in feature in power bi to create the bins base on the calculated column.
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that thumbs up button 🫡👍
Actually I cant. The logic to check user selection and get the average duration only works as a measure.
- gmsamborn2 years agoSuper User
Hi Anonymous
I created a bucket table with 3 columns: Bucket (ie. 0-10), Min(0) and Max (10) for each bucket.
I wrote 1 measure.
Count = COUNTROWS( FILTER( ALL( 'Table' ), 'Table'[Average (days)] >= SELECTEDVALUE( 'Buckets'[Min] ) && 'Table'[Average (days)] <= SELECTEDVALUE( 'Buckets'[Max] ) ) )The ALL() might have to be changed to ALLSELECTED() depending on your needs.
Let me know if you have any questions.
Create a Distribution chart by bucketizing a measure.pbix
- Anonymous2 years agoNot applicable
Thank you! that worked.
I'm trying to visualize this using bar charts. Would you be able to know how to create bins? Like for example, I want user to select bins of 10, 20, 30, 30 etc. Is there a way to show this? Also what if the duration between two tasks is like say 1000 days.
thanks