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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Tob_P
Helper IV
Helper IV

Groups/Bins from a Measure

Hi,

 

Done a fair bit of reading on this but can't find a use case scenario similar so wanted to ask here. Inherited a report which has the following Measure...

 

Sum of Max Amount = SUMX(DISTINCT('NAV_Sales Header'[OTP No_]),[Max Amount])+0

 

...which essentially gives me the Maximum Value. What I need to be able to do is create a calculated column that groups the max amount into the following groupings. I've created this unrelated table (tbl_BinTable) in my .pbix

 

Range NameMinMaxIndex

£0 - £5,000050001
£5,000 - £20,0005000200002
£20,000 - £50,00020000500003
£50,000 - £100,000500001000004
£100,000+10000050000005

 

Is it possible to create groupings based on a Measure?

 

Apologies, on this one I don't have any sample data to share.

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

Hi  @Tob_P ,

 

Here are the steps you can follow:

1. Create calculated column.

Column =
MAXX(
    FILTER(ALL('Table'),
    'NAV_Sales Header'[Sum of Max Amount]>='Table'[Min]
    &&
    'NAV_Sales Header'[Sum of Max Amount]<='Table'[Max]),[Index])

2. Result:

vyangliumsft_0-1679899491025.png

 

Best Regards,

Liu Yang

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

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Tob_P ,

 

Here are the steps you can follow:

1. Create calculated column.

Column =
MAXX(
    FILTER(ALL('Table'),
    'NAV_Sales Header'[Sum of Max Amount]>='Table'[Min]
    &&
    'NAV_Sales Header'[Sum of Max Amount]<='Table'[Max]),[Index])

2. Result:

vyangliumsft_0-1679899491025.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@Tob_P , refer

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

 

 

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://youtu.be/EyL7KMw877Q

Hi @amitchandak 

Thanks for sharing - I'm looking more specifically for a calculated column, rather than a measure, so that I can use those bandings in a Slicer to filter by.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors