Forum Discussion
AVERAGEIFS in Power BI using Measures
Hi
In the below Matrix, each of the Columns is a Measure. CY = Current Year and PY = Previous Year. What I want to do is find the Average Salary change for each Grade, but only if the Salary Change is between 0 and 100% and only if there are values in the Grade Column. In excel I achieve this with:
AVERAGEIFS( Salary Change, Salary Change >=0, Salary Change <1, CY 6000 - Fee Earners LLP >0, PY 6000 - Fee Earners LLP >0)
Could you offer some guidance on how I might achieve this in Power BI?
Many thanks!
7 Replies
- amitchandak
Super User
You can use AVERAGEX
AVERAGEX(Table, <Use if to choose measures>)
table can be filter(table, filter)
https://docs.microsoft.com/en-us/dax/averagex-function-dax
https://community.powerbi.com/t5/Desktop/averagex/td-p/150294
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin- Multiverse_76Frequent Visitor
Many thanks. I'm trying but not having much success...
Average Increase = CALCULATE(AVERAGEX(filter('Combined_Tbl',[Salary Change]>0 && [Salary Change] <1 && 'Combined_Tbl'[CY 6000 - Fee Earners LLP] >0 && 'Combined_Tbl'[PY 6000 - Fee Earners LLP] >0 ) , [Salary Change]))
- amitchandak
Super User
[Salary Change] is a measure? From what level you want to group the data