Forum Discussion
How to create Bucket in PowberBI
- Anonymous6 years ago
Hi Anonymous
You can use EnterData and calculated column to achieve your goal.
I build two tables to have a test.
Rev Table:
Slicer Table:
Add a calculated column in Slicer Table.
Virtual Bracket Granted = VAR _MINK = DIVIDE ( Slicer[Min], 1000 ) & "" & "k€" VAR _MAXK = DIVIDE ( Slicer[Max], 1000 ) & "" & "k€" RETURN IF ( Slicer[Max] = BLANK (), COMBINEVALUES ( "-", _MINK, BLANK () ), COMBINEVALUES ( "-", _MINK, _MAXK ) )Result:
Then build a measure in Rev Table.
Measure = VAR _Select = SELECTEDVALUE ( Slicer[Virtual Bracket Granted] ) VAR _Min = CALCULATE ( SUM ( Slicer[Min] ), Slicer[Virtual Bracket Granted] = _Select ) VAR _Max = CALCULATE ( SUM ( Slicer[Max] ), Slicer[Virtual Bracket Granted] = _Select ) VAR _Revenue = SUM ( 'Rev'[Revenue] ) RETURN IF ( _Max = BLANK () && _Revenue >= _Min, _Revenue, IF ( _Revenue >= _Min && _Revenue < _Max, _Revenue, BLANK () ) )Result:
You can download the pbix file from this link: How to create Bucket in PowberBI
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , you have made bucket as a standalone table with limits and create a measure to use this table
refer
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://radacad.com/dynamic-banding-or-grouping-in-power-bi-using-dax-measures-choose-the-size-of-bins
https://www.credera.com/blog/technology-solutions/creating-aging-report-using-a-user-selected-date-in-power-bi/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization