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
JCBI1023
Helper III
Helper III

Finding the Average of a Sum Measure (pictures included)

Hello Community,

 

Thank you for your continued help.

 

I have a line and clustered column chart. The bar graph shows  total wholegoods (iventory) and the line graph shows total sales. I then included a slice to filter the chart by MAKE of equipment.

Wholegoods.png

 

The table at the bottom shows Make - Total Wholegoods -- %GT Total Wholegoods -- Sales -- %GT Sales. To measure the total wholegoods, I sum'ed each month's Wholegoods value i.e. April Sales = SUM('April Inventory'[April Wholegoods]) and then created a 'Total Wholegoods' meaure: Total Wholegoods = [April Sales] + [December Sales] + [February Sales] + [January Sales] + [March Sales] + [November Sales] + [October Sales]

 

Now, what I need is to find the Average Total Wholegoods Per Month. Essentially another column here: 

make.png

 

That shows the Averge Wholegoods Per Month. For example, when the 'Elliot' make is selected, take the wholegoods per month values and find the average:

 

Average.png

 

 

Thank you.

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @JCBI1023,

Please create a measure to calculate the Average Total Wholegoods Per Month.

Average=CALCULATE(SUM(Table[Wholegoods]),ALLSELECTED(Table))/CALCULATE(DISTINCTCOUNT(Table[Month]),ALLSELECTED(Table))


I create the following sample table and test.

1.PNG

Create a bar chart, the x-axis is month, the Y-axis shows the total of value. Create a measure to get average.

Average = DIVIDE(CALCULATE(SUM(Table4[Value]),ALLSELECTED(Table4)),CALCULATE(DISTINCTCOUNT(Table4[Month]),ALLSELECTED(Table4)))


Please see the screenshots below, and get expected result.

2.PNG 3.png 3.png

Best Regards,
Angelia


 

View solution in original post

2 REPLIES 2
MagnusSvendsen
Frequent Visitor

Dear All,

 

I have found the networking days between our confirmed delivery date and shipment date. If we ship according to what we have confirmed to the customer, the value will be 2.

 

Now I need to find a value that tells me, how many deliveries, we ship according to what we promised = value = 2.

Therefore I need to have a %number, which says how many % of the column networking days = 2.

 

In the below case, if we imagine that it was all our deliveries for November, we delivered 33,33%. on time.

MagnusSvendsen_0-1669202975948.png

Networking days is a measured value

MagnusSvendsen_1-1669203108425.png

 

 

 

v-huizhn-msft
Employee
Employee

Hi @JCBI1023,

Please create a measure to calculate the Average Total Wholegoods Per Month.

Average=CALCULATE(SUM(Table[Wholegoods]),ALLSELECTED(Table))/CALCULATE(DISTINCTCOUNT(Table[Month]),ALLSELECTED(Table))


I create the following sample table and test.

1.PNG

Create a bar chart, the x-axis is month, the Y-axis shows the total of value. Create a measure to get average.

Average = DIVIDE(CALCULATE(SUM(Table4[Value]),ALLSELECTED(Table4)),CALCULATE(DISTINCTCOUNT(Table4[Month]),ALLSELECTED(Table4)))


Please see the screenshots below, and get expected result.

2.PNG 3.png 3.png

Best Regards,
Angelia


 

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.