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'm trying to do some Outlier analysis, but this has led to more simple things that I'm not able to do along the way.
To keep it simple, I have a table of data with a unique REF and a numeric count of Defects.
I want to compare the number of defects on each row, to the average, so I'm first calculating the average...
If I add a column : cAveDefects = average(table[Defects]), then this is calculated for the ENTIRE table (which is fine).
But my first hurdle is that this doesn't update when I filter, eg. to only thse that have 2 or less defects ?
So say I wanted to filter by some other attribute (colour) it wouldn't change either, so I'd be comparing the rows defect value with the ENTIRE table not just the filtered values. I'm guessing I need to use CALCULATE but various attempts have failed. Any ideas?
Solved! Go to Solution.
Hi @Anonymous ,
Try modiffying your DAX as follows:
cAveDefects = CALCULATE(AVERAGE(table[Defects]), ALLSELECTED(table))
See if this helps in your scenario.
Thanks,
Pragati
@Anonymous , Create a measure as suggested by @Pragati11 . The column will not change with slicer.
Hi @Anonymous ,
Try modiffying your DAX as follows:
cAveDefects = CALCULATE(AVERAGE(table[Defects]), ALLSELECTED(table))
See if this helps in your scenario.
Thanks,
Pragati
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 | |
106 | |
87 | |
74 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |