cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Regular Visitor

## Grouped average with Slicers gives wrong values

Hi everyone.

I have a data set that looks like this:

 AssemblyName ProcessStep SerialNumber TouchTime Date Assembly1 Build N001 30 3/1/2023 Assembly1 Build N002 35 3/2/2023 Assembly1 Build N003 25 3/3/2023 Assembly2 Build N004 40 3/1/2023 Assembly2 Test N004 50 3/1/2023 Assembly2 Measure N004 20 3/2/2023 Assembly2 Build N005 35 3/2/2023 Assembly2 Test N005 45 3/2/2023 Assembly2 Measure N005 30 3/4/2023

I am looking at the touch time for various assembly processes on the manufacturing line. Some assemblies only have one process step, while others have more than one.

When I use a slicer to look at the touch time data for one assembly, and one process step, the average appears to work correctly.

But when I try use a slicer to look at the touch time for multiple process steps, the totals are still correct but the average goes down. I believe this is because it is taking the total sum and then dividing by the total number of steps. What I want is for it to take the average of each individual process step and then add those averages together.

1 ACCEPTED SOLUTION
Community Support

According to your description, here are my steps you can follow as a solution.

(1)  My test data is the same as yours.

(2) We can create a measure.

``Average Touch Time = SUMX( VALUES('Table'[ProcessStep]), AVERAGE('Table'[TouchTime]) )``

(3) Then the result is as follows.

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

Best Regards,

Neeko Tang

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

3 REPLIES 3
Super User

Hi,

On the data that you have shared, show the expected result.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Community Support

According to your description, here are my steps you can follow as a solution.

(1)  My test data is the same as yours.

(2) We can create a measure.

``Average Touch Time = SUMX( VALUES('Table'[ProcessStep]), AVERAGE('Table'[TouchTime]) )``

(3) Then the result is as follows.

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

Best Regards,

Neeko Tang

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

Regular Visitor

Thanks that works perfectly!