Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a calculated column with item sales as a percentage of total sales. It is just the total sales for each item divided by the total sales overall).
I am trying to create a new column, based on the Percent Sales column.
I would like the column say "TOP" if the percentage makes up the top 20% of sales, and "BOTTOM" if the item makes up the bottom 20% of sales.
I am having a hard time wrapping my head around how to write this as a calculated column.
Any help is appreaciated.
Here are details for the Percent Sales calculated column:
Solved! Go to Solution.
Hi @joshs444 ,
I tried to reproduced it.
You need to modify the [Sum Sales - Invoided Orders] as
Sum Sales - Invoided Orders = [Quantity]*[Unit Price]
[Percent Sales] now is good.
And it's the column to dispaly "TOP" and "BOTTOM".
Type = IF([Percent Sales]>0.2,"TOP","BOTTOM")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @joshs444 ,
I tried to reproduced it.
You need to modify the [Sum Sales - Invoided Orders] as
Sum Sales - Invoided Orders = [Quantity]*[Unit Price]
[Percent Sales] now is good.
And it's the column to dispaly "TOP" and "BOTTOM".
Type = IF([Percent Sales]>0.2,"TOP","BOTTOM")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@joshs444 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
| User | Count |
|---|---|
| 58 | |
| 44 | |
| 31 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 77 | |
| 66 | |
| 44 | |
| 24 | |
| 22 |