Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

amitchandak
Super User
Super User

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

 

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

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.