Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
amirhabshush
New Member

DAX Average Excluding Zero-"The end of the input was reached"

Hello, 

im trying to use this formula-

 

Average of SD Covered = CALCULATE( AVERAGE('Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]), FILTER('Table1 (2)', 'Table1 (2)'[SD Covered (m) [> 5.5(m/s)]])<> 0 ))
 

but for some reason the warning "The end of the input was reached" is shown.

 

Can someone please help?

thanks!

1 ACCEPTED SOLUTION

I took some dummy data and deduced the column name and table name from the dax you gave. As you can see, I get the correct result for the dummy data.

 

Aditya_Meshram_1-1629123407716.png

Regards,

Aditya

 

View solution in original post

8 REPLIES 8
Aditya_Meshram
Solution Supplier
Solution Supplier

Hi @amirhabshush 

 

You typed an extra bracket here. 

Aditya_Meshram_1-1629111519963.png

This error usually comes when you're missing a close parenthesis or you have too many, or some other punctuation mistake.

 

Regards,

Aditya

Thanks a lot for your answer Aditya @Aditya_Meshram ,

 

But unfortunately this bracket is a part of the value itself.

I still tried to do what you said but the following error occured:

 

The syntax for ')' is incorrect. (DAX(CALCULATE( AVERAGE('Table1 (2)'[SD Covered (m) [> 5.5(m/s)]), FILTER('Table1 (2)', 'Table1 (2)'[SD Covered (m) [> 5.5(m/s)])<> 0 )))).

I pointed at the round bracket, not the square bracket, what I meant is this :

 

Average of SD Covered = CALCULATE( AVERAGE('Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]), FILTER('Table1 (2)', 'Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]<> 0 ))

 

 Let me know if this gives the required result

hi again @Aditya_Meshram,

 

it still doesn't work

 

Average of SD Covered = CALCULATE( AVERAGE('Table1 (2)'[SD Covered (m) [> 5.5(m/s)]], FILTER('Table1 (2)', 'Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]<> 0 )))
 
the last Parenthesis appear automatically once i click on the v.

I took some dummy data and deduced the column name and table name from the dax you gave. As you can see, I get the correct result for the dummy data.

 

Aditya_Meshram_1-1629123407716.png

Regards,

Aditya

 

Hi @amirhabshush, please try this, sorry for the inconvenience 

 

Average of SD Covered = CALCULATE( AVERAGE('Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]]), FILTER('Table1 (2)', 'Table1 (2)'[SD Covered (m) [> 5.5(m/s)]]]<> 0 ))

 

 This seems to work in my system. It would be helpful if you could give some sample data with table name and column name. 

 

 

Hi @Aditya_Meshram it worked!

 

thank you very much for your kind help!

Hi @amirhabshush , you are welcome, I'm glad that it worked! It would mean a lot to me if you could accept my reply as a solution.

 

Regards,

Aditya

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.