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
cyborgandy
Helper II
Helper II

Grouping Of Supplier as per spend

Hi All,

 

I have below dataset,

 

I need make a table to have a group of distinct count supplier top 1-2 3-4 and 5-6 as per spend , can some please help how to get this done in power bi

Company NameSpend
ABC2000
EFG3000
HIJ4000
KLM5000
NOP6000
QRS7000
TUV8000
WXY9000
ABC10000
EFG11000
HIJ12000
KLM13000
NOP14000
QRS15000
TUV16000
WXY17000
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @cyborgandy ,

According to your description, here's my solution.

1. Create a calculated column.

Rank =
RANKX ( 'Table', 'Table'[Spend] )

2. For example I want to divide the table into groups of 3 companies, it means there're 3 companies in each group.

vkalyjmsft_0-1663580422959.png

Create a calculated column.

Group =
VAR _D =
    DIVIDE ( 'Table'[Rank], 3 )
RETURN
    IF ( _D > INT ( _D ), INT ( _D ) + 1, _D )

 Get the correct result.

vkalyjmsft_1-1663580648303.png

You just need to change 3 in the formula to 50(you mentioned) in your sample.

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @cyborgandy ,

According to your description, here's my solution.

1. Create a calculated column.

Rank =
RANKX ( 'Table', 'Table'[Spend] )

2. For example I want to divide the table into groups of 3 companies, it means there're 3 companies in each group.

vkalyjmsft_0-1663580422959.png

Create a calculated column.

Group =
VAR _D =
    DIVIDE ( 'Table'[Rank], 3 )
RETURN
    IF ( _D > INT ( _D ), INT ( _D ) + 1, _D )

 Get the correct result.

vkalyjmsft_1-1663580648303.png

You just need to change 3 in the formula to 50(you mentioned) in your sample.

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

PVVBl00
Helper I
Helper I

In the filters tab for the table you have the option to make a top for the amount you want, in this example I made you a top 5 of Name spend according to the amounts or then you order them from highest to lowest to show them in order, if this is or that you were looking for please mark it as an answer for other users to find it easier, Best regards

PVVBl00_1-1663250344931.png

 

 

Thanks for your response, its dummy value that I have given, I have more that 1600 company with the spend and I need todivide these 1600 into group of 50 companies from highest spend to lowest spend.

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.