cancel
Showing results for
Search instead for
Did you mean:
Helper I

## Customer Revenue - Splitting into 10 Quartile

Hello,

I have a mock dataset here:

 Company Type of Goods Qty Profit (\$) Avg Selling Price (\$) A 1 10 120 12 B 1 20 200 10 E 3 10 90 9 C 1 40 280 7 A 2 40 320 8 E 3 20 120 6 A 1 30 180 6 C 1 10 110 11 C 3 20 220 11

There are a total of more than 2000 entries with over 100+ different companies.

I would like to create a visualization that is able to capture the % proportion of the total profit in 10 quartiles of an equal number of distinct customers. I am not sure if I should create a table or measure that adds up the sum of all profits for each company.

I'm thinking of doing a bar chart with each bar representing a certain % and all will add up to give me 100%.

I really appreciate it if there is a better way to visualize this. Thank you for your help.

1 ACCEPTED SOLUTION
Community Support

Hi, @lwklwk98

According to your description and sample data, I can roughly understand your requirement, I think you can try this measure to achieve this:

``````Percent of total =

var _total=SUMX(ALL('Table'),[Profit (\$)])

var _profit=CALCULATE(SUM('Table'[Profit (\$)]),FILTER(ALL('Table'),[Company]=MAX('Table'[Company])))

return

DIVIDE(_profit,_total)``````

Then you can change the measure format like this:

Then you can create a clustered column chart to place the fields like this:

And you can get what you want.

You can download my test pbix file below

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

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

1 REPLY 1
Community Support

Hi, @lwklwk98

According to your description and sample data, I can roughly understand your requirement, I think you can try this measure to achieve this:

``````Percent of total =

var _total=SUMX(ALL('Table'),[Profit (\$)])

var _profit=CALCULATE(SUM('Table'[Profit (\$)]),FILTER(ALL('Table'),[Company]=MAX('Table'[Company])))

return

DIVIDE(_profit,_total)``````

Then you can change the measure format like this:

Then you can create a clustered column chart to place the fields like this:

And you can get what you want.

You can download my test pbix file below

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

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

## Helpful resources

Announcements

#### Manage your user group events

Check out the News & Announcements to learn more.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

#### Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

#### Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Top Kudoed Authors