Forum Discussion

JasonFurtner's avatar
JasonFurtner
Regular Visitor
3 years ago
Solved

Grouped average with Slicers gives wrong values

Hi everyone.

 

I have a data set that looks like this:

AssemblyNameProcessStepSerialNumberTouchTimeDate
Assembly1BuildN001303/1/2023
Assembly1BuildN002353/2/2023
Assembly1BuildN003253/3/2023
Assembly2BuildN004403/1/2023
Assembly2TestN004503/1/2023
Assembly2MeasureN004203/2/2023
Assembly2BuildN005353/2/2023
Assembly2TestN005453/2/2023
Assembly2MeasureN005303/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. 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi JasonFurtner ,

     

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi JasonFurtner ,

     

    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.