Forum Discussion

lcfaria's avatar
lcfaria
Helper II
3 years ago

AVERAGEX using Summarized table

Hi everybody,

 

I'm trying to get the average from a summarized table where I have the calculated values for performance and bonus.

 

What I need to do is: If the performance is greater than or equal to 80%, the bonus must be considered up to a maximum of 20.

 

Things work fine in DAX Studio, but when I step the measure into Power BI, the value 0 is always returned, instead of the 3-month average.

DAX STUDIO
Created table:

 

Expected value (average of the "Final Bonus" column):

Power BI 

Note: In Power BI I have an external filter applied to year/month = "2022/09" and I can understand that as I am looking for september and in this month I have a performance below 80%, the returned value is 0. But I need it to return 13.33%.

Measure:

Power BI returned value:

It should be 13.33%

 

I appreciate the community's help. Thanks!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lcfaria ,

    Please create another new measure as below base on the current measure, then replace the orignial measure and put this new measure onto the card viaul. Later please check if you can get the correct result.

    New Measure = SUMX ( VALUES ( 'Calendario'[Ano/Trimestre] ), [Measure] )

     

    If the above one can't help you get the desired result, please provide some sample data in your table 'data' (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. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards

    • lcfaria's avatar
      lcfaria
      Helper II

      Hi Anonymous, it didn't work. I will try to isolate the issue using sample data. For now, thanks for your help.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi lcfaria ,

        Thanks for your feedback. Looking forward to your next reply. 

        Best Regards