cancel
Showing results for
Did you mean:
Frequent Visitor

## Total of average amount impact not working

 Year Product ProdSubCat Pricecurryr priceprvyr qty price pricediff afftectedamt 2020 11 12 2.20 2.10 1 2.20 .10 .10 2019 11 12 2.10 2.10 1 2.10 0 0 2020 11 14 1 1 1 1 0 0 2019 11 14 1 1 1 1 0 0 2019 11 15 2 2 2 2 0 0 Total 8.10

measure =(Pricecurryr-priceprvyr)*qty

Pricecurryr,priceprvyr and qty are other measures refered in above measure.

1 ACCEPTED SOLUTION
Community Support

Hi @sneevand ,

Be aware that DAX measure are based on row context.

You could try to create a measure like this:

``Measure = AVERAGEX(VALUES(TABLE[YEAR]),([Pricecurryr]-[priceprvyr])*[qty])``

If the problem persists,could you share the sample pbix via cloud service like onedrive for business or paste the fact table data?

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

2 REPLIES 2
Community Support

Hi @sneevand ,

Be aware that DAX measure are based on row context.

You could try to create a measure like this:

``Measure = AVERAGEX(VALUES(TABLE[YEAR]),([Pricecurryr]-[priceprvyr])*[qty])``

If the problem persists,could you share the sample pbix via cloud service like onedrive for business or paste the fact table data?

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

Super User IV

@sneevand , Try a measure with one of the two options

Averagex(Table,([Pricecurryr]-[priceprvyr])*[qty])

Divide(Sumx(Table,([Pricecurryr]-[priceprvyr])*[qty]), Sum(Table[Qty])

Proud to be a Super User!

Announcements

#### Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks