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.
Hi All,
need some help on calculating avg of values depending upon duplicates in another 2 columns
i have a table fetched via api . now the table has multiple columns
i am trying to create a measure/column that can remove the duplicacy and generate avg so that overall rows can be reduced.
for example -
Column 1 Column 2 Column3
A CT 0.22
A CT 0.34
B CT 0.23
B TR 0.11
B TR 0.14
C ED 0.25
C TR 0.14
im looking for below output
Column1 Column2 Column2
A CT avg of(0.22,0.34)
B CT 0.23
B TR avg of(0.11,0.14)
and so on
Solved! Go to Solution.
Hi @Anonymous,
Try measure as:
Measure =
CALCULATE(
AVERAGE('Table'[Column3]),
FILTER(
ALL('Table'),
'Table'[Column2]=MAX('Table'[Column2])&& 'Table'[Column1]=MAX('Table'[Column1])
)
)
Here is the output:
Here is the demo, please try it: average of column values depending upon the duplicate entries in another column
Best Regards
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous,
Try measure as:
Measure =
CALCULATE(
AVERAGE('Table'[Column3]),
FILTER(
ALL('Table'),
'Table'[Column2]=MAX('Table'[Column2])&& 'Table'[Column1]=MAX('Table'[Column1])
)
)
Here is the output:
Here is the demo, please try it: average of column values depending upon the duplicate entries in another column
Best Regards
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
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.