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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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