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.
I have 4 columns containing data, I would like to know the average of these columns per row, but only if they contain data that meets a set criteria, otherwise I need the data excluded from the average calculation. For example, I want to take the average of these four columns (C 1-4) but to exclude any value less than 10 from the average.
C1 | C2 | C3 | C4 | AVG Needed | Actual AVG |
20 | 30 | 40 | 5 | 30 | 23.75 |
2 | 20 | 20 | 2 | 20 | 11 |
Ex.) I attempted using a version of the following code for a calculated column with no success.
hi @EEPB
1) tranpose the data table in Power Query Editor to:
2) then write two measures like:
Columm2Avg =
AVERAGEX(
FILTER(
TableName,
TableName[Column2]>=10
),
TableName[Column2]
)
Columm3Avg =
AVERAGEX(
FILTER(
TableName,
TableName[Column3]>=10
),
TableName[Column3]
)
it worked like:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |