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 need have a measure made that gives me average of days.
I have a column wiht ID and a column with days spent,
Example
UID DAYS
1 32
2 5
2 5
4 15
5 33
6 12
6 12
8 5
9 5
10 15
Average should be 15.25
I have tried the following solution http://community.powerbi.com/t5/Desktop/Average-based-on-distinct-values-in-another-column/m-p/60122...
But doesnt seem to work for me 😕
Solved! Go to Solution.
How about this
=Averagex(values(table[UID]), average(table[days]))
How about this
=Averagex(values(table[UID]), average(table[days]))
Do you know how it works?
Averagex is an iterator. It steps through a table - in this case it is a single column table containing all the unique UIDs created by values(table[UID]. For each unique UID, the formula average(table[days]) is evaluated. Assuming each unique UID has the same value for [days], the average will be the same as the value. After each UID has been evaluated, AVERAGEX works out the average of the values.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |