Forum Discussion
Anonymous
6 years agoNot applicable
How to create Bucket in PowberBI
Dear, I would like to create a bucket/slicers table (see bellow) Thank you.
- 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.
Fowmy
Super User
6 years agoAnonymous
You create a table using the following option: ENTER DATA - You can paste from Excel as well
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂