Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to create Bucket in PowberBI

Dear,

 

I would like to create a bucket/slicers table (see bellow)

 

WhiteLight_FI_0-1599140282394.png

Thank you. 

 

 

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

You can use EnterData and calculated column to achieve your goal.

I build two tables to have a test.

Rev Table:

1.png

Slicer Table:

2.png

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:

3.png

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:

4.png

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. 

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

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

v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

You can use EnterData and calculated column to achieve your goal.

I build two tables to have a test.

Rev Table:

1.png

Slicer Table:

2.png

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:

3.png

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:

4.png

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
Super User

@Anonymous 

You create a table using the following option: ENTER DATA - You can paste from Excel as well

 

Fowmy_0-1599142622455.png

________________________

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 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.