cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sneevand
Frequent Visitor

Total of average amount impact not working

         
YearProductProdSubCatPricecurryrpriceprvyrqtypricepricediffafftectedamt
202011122.202.1012.20.10.10
201911122.102.1012.1000
20201114111100
20191114111100
20191115222200
       Total8.10

 

measure =(Pricecurryr-priceprvyr)*qty

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

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
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.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
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.

View solution in original post

amitchandak
Super User IV
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])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.