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.
Hi Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou