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
I need to be able to sum the average of different tasks per state where each individual row represents 1 instance
Data:
State - Animal - Amount Trigger
NSW - Cows - 62
NSW - Cows - 62
NSW - Chickens - 10
NSW - Chickens - 10
NSW - Horses - 52
NSW - Horse - 52
NSW - Horse - 52
Where a matrix looks like the below
NSW (total is the sum of the amount triggers = 124 not the average across all individual lines)
- Cow - 62
- Chicken - 10
- Horse - 52
Help please!
Solved! Go to Solution.
Sum - Average of Amount Trigger per Animal =
If ( HASONEVALUE('Table Category'[Animal]),
AVERAGE('Table Category'[Amount Trigger]),
CALCULATE( SUMX( SUMMARIZE( 'Table Category', 'Table Category'[Animal]), CALCULATE( AVERAGE('Table Category'[Amount Trigger]))))
)
Adjust the format as number if needed.
Thanks heaps it works!
Sum - Average of Amount Trigger per Animal =
If ( HASONEVALUE('Table Category'[Animal]),
AVERAGE('Table Category'[Amount Trigger]),
CALCULATE( SUMX( SUMMARIZE( 'Table Category', 'Table Category'[Animal]), CALCULATE( AVERAGE('Table Category'[Amount Trigger]))))
)
Adjust the format as number if needed.
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |