Forum Discussion

mmuddasar's avatar
mmuddasar
Advocate I
10 years ago

Average Line on Scatter Displaying Wrong Value

Hi

 

My Average Line on my Scatter Chart is set to use a Volume YoY % measure ( :=SUM ( TY VOL ) / SUM ( LY VOL ) - 1 ).

 

Under Details I have the Business dimension, so my Scatter is showing YOY % Volume by Business.

 

However, my Average Line is displaying the arithmetic mean of the individual Business YoY %'s instead of the value returned by the YoY % measure. So the Average Line is using my measure, but instead of taking its evaluated value (given what's visible in the scatter) its simply averaging each YoY % for each visible Business.

 

How can I achieve an Average Line which uses the correct measure value? (this looks like a bug).

 

Thank you.

 

 

4 Replies

  • v-haibl-msft's avatar
    v-haibl-msft
    Microsoft Employee

    mmuddasar

     

    I’m not so clear about your problem, could you please give a screenshot of your Scatter chart and its Fields?

     

    Best Regards,

    Herbert

      • v-haibl-msft's avatar
        v-haibl-msft
        Microsoft Employee

        mmuddasar

         

        The calculation method of the Average Line should be like the following DAX formula. So the Average Line is averaging each YoY % for each visible Business.

        Avg = 
        AVERAGEX ( ALL ( Table1 ), [YoY % measure] )

         

        To get your expected Avg result, we need to use the DAX formula like below. But we can only show it in some other visuals (e.g. Line chart) using a separate line, because it will clear all filters.

        Avg_All = 
         (
            CALCULATE ( SUM ( Table1[2016 Weeks] ), ALL ( Table1 ) )
                / CALCULATE ( SUM ( Table1[2015 Volume] ), ALL ( Table1 ) )
                - 1
        )

         

        It seems not to be a bug but an expected logic in current version. I found a same idea here, if you have the same desire, you can vote it.

         

        Best Regards,

        Herbert