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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Stacked bar chart average

Hi, need some help 😉

 

I have in column A the total price for a product (product type is in column C).

In column B I see how many of the product I sold.

So for example:

  • 10€ / 5pcs / Apple
  • 20€ / 3pcs / Banana
  • 25€ / 6pcs / Peer
  • 20€ / 11pcs / Apple 
  • ... (of course thousands of products and thousands of lines)

So all the lines are a collection of all the sold items.

Now I wish to know what my price per pcs per product is in a pareto (what is the best item to sell).

I want to have the average off all the lines. Note for example that in the first line an apple cost 2€ and in the last line slightly less. So the prices are not always identical.

How can I do this? 🙂

I created a stacked bar chart to try and create a pareto, but it gives me the result of the SUM of all the apples. In this case 2€ + 1.8€ = 3.8€ in the pareto. But I want to divide this number by the amount of times there are apples in my column C. 

 

I hope my request is clear. It looks very logical in my head 😄

 

Thanks in advance!

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

hi, @Anonymous 

Try this way as below:

Step1:

Add new column for price for each line

Price = 'Table'[Column A]/'Table'[Column B]

Step2:

Use this formula to add a measure

Measure = CALCULATE(SUM('Table'[Price]))/CALCULATE(COUNTA('Table'[Column C]))

Result:

3.JPG

Best Regards,

Lin

Community Support Team _ Lin
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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Try this way as below:

Step1:

Add new column for price for each line

Price = 'Table'[Column A]/'Table'[Column B]

Step2:

Use this formula to add a measure

Measure = CALCULATE(SUM('Table'[Price]))/CALCULATE(COUNTA('Table'[Column C]))

Result:

3.JPG

Best Regards,

Lin

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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