Forum Discussion
JJ51
4 years agoFrequent Visitor
Create Categories Based On Count From a Measure
Hey all! I'd like to preface by saying that I am mostly new to Power BI, not a programmer, and I am self-taught, so if this question seems obvious or is a standard practice, please forgive my ign...
- 4 years ago
Hi JJ51
Here is a sample file with the solution https://www.dropbox.com/t/X2AzilJNQyYDLliOYou nedd to have a calculated column
Buckets = VAR NumberOfChanges = COUNTROWS ( CALCULATETABLE ( Changelog, ALLEXCEPT ( Changelog, Changelog[Issue #] ) ) ) VAR Result = SWITCH ( TRUE(), NumberOfChanges IN { 1, 2, 3 }, "1-3", NumberOfChanges IN { 4, 5, 6 }, "4-6", NumberOfChanges IN { 7, 8, 9 }, "7-9", NumberOfChanges IN { 10, 11, 12 }, "10-12", NumberOfChanges IN { 13, 14, 15 }, "13-15", ">15" ) RETURN ResultThe the measure would be
Count = DISTINCTCOUNT ( Changelog[Issue #] )
Anonymous
4 years agoNot applicable
Hi JJ51 . Power BI has the ability to create Bins. Here are couple of examples:
Creating Groups and Histogram Bins in Power BI - YouTube
Create Buckets or Groups with Power Query in Power BI - YouTube
In you situation, I would be attempted to add a Calculated Column to the main table with the "Count of Changes". This might be required to create the Bins for the grouping.