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
Anonymous
Not applicable

AVERAGE function not working and returning 0

Hello,

 

I'm using this very basic measure: 

 

Measure = AVERAGE('platform inbound_case'[Case Duration])
 
But when I put the result in a Card I get: 0,00
 
The case duration column looks like this:
 
benlepa0_0-1660813717343.png

 

I don't understand why it's returning 0...

 

Thanks a lot for your help

 

Regards

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Sound strange. Please check there is no page level, or visual level filter.

 

data type is decimal or whole number.

 


Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Anonymous
Not applicable

Hello,

 

Thank you for your reply.

 

I double checked and there's no filters applied.

 

Data type is decimals.

 

I'm using DirectQuery so I can only display data in visuals as I've done with the screenshot. It's mainly populated with high numbers so I don't really understand what can explain this zero result.

 

But on the Micorsoft documentation I found that: 

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

There's no RLS but I'm not sure about the first point, what does it means exactly?

HI @Anonymous,

What type of value are you calculated on? AFAIK, current power b cannot directly use aggregation function on date or time values. I'd like to suggest you convert them to numeric values first and use the aggregate function to calculate. 

For aggregate duration values, you can take a look at the following blog:

Aggregating Duration Time 

>>This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

In direct query mode, power bi has limited DAX function usage when you are trying to create calculated column/table expressions. Please use measure expression instead.

BTW, please also check the decimal place to confirm if the result value is less than 1 and show with 0 decimal places.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hello, thank you for your answer 🙂

 

The data type is already decimals not date or time.

 

I checked the decimals and there's no hidden numbers.

 

Thank you

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.