Forum Discussion
fisqkuz
4 years agoNew Member
averageX with where statement?
For every hour I want to subtract one column from the other one only if the last column is smaller than the first one. Then I want the average of the result. Currently trying (but failing o...
- 4 years ago
Hi fisqkuz
Try this way, create the measures
DIFF = IF(MIN('Table'[Y])<MIN('Table'[X]),MIN('Table'[X])-MIN('Table'[Y]))average = AVERAGEX('Table',[DIFF])result (see sample file attached below)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
v-xiaotang
Community Support
4 years agoHi fisqkuz
Try this way, create the measures
DIFF = IF(MIN('Table'[Y])<MIN('Table'[X]),MIN('Table'[X])-MIN('Table'[Y]))average = AVERAGEX('Table',[DIFF])
result (see sample file attached below)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.