Forum Discussion
calculate average with filter
- Anonymous2 years ago
Hi sd0021781 ,
I’ve made a test for your reference:
1\I assume there is a table
2\Add a measure
Average = AVERAGEX( FILTER( 'Table', 'Table'[Column1] <> "-" ), VALUE(SUBSTITUTE('Table'[Column1], "%", "")) / 100 )3\Result
Best Regards,
Bof
6 Replies
- rajendraongole1
Super User
Hi sd0021781 - Can you please add some more details about your query to answer quickly.
please follow the below link:
Re: How to Get Your Question Answered Quickly - Page 5 - Microsoft Fabric Community
- sd0021781Regular Visitor
I have numbers in percentile and - in some filds. How to calculate the average excluding (-)? please help
- rajendraongole1
Super User
Hi sd0021781 - you average agent information measure should be this as below:
Average Without Dash1 =CALCULATE(AVERAGEA('Averag'[Column1]),'Averag'[Column1] <> "-")Hope it works.
- sd0021781Regular Visitor
I calculated as you said but the result shows '0'. Expectation is to exclude dash and calculate the average of remaining numbers like
-
100
100
100
0
-
100
50
-
0
100
Expected answers after ignoring dash should be (550/8)= 68.75
however i am getting 0 as an answer basis the calculation you have provided.
I appreciate your efforts and looking forward to your next reply
- sd0021781Regular Visitor
How to calculate average of the given numbers with (-) in some cells. I want to exclude (-) value while calculating
- AnonymousNot applicable
Hi sd0021781 ,
I’ve made a test for your reference:
1\I assume there is a table
2\Add a measure
Average = AVERAGEX( FILTER( 'Table', 'Table'[Column1] <> "-" ), VALUE(SUBSTITUTE('Table'[Column1], "%", "")) / 100 )3\Result
Best Regards,
Bof