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
nadavsn
Advocate I
Advocate I

Aggregate column with Blank values

Hi all
I am trying to create a measure that returns the AVERAGE of whole number column that includes BLANK. I want the measure to ignore these rows with blank on it.
I tried:
MaxDeleteBucketGap = CALCULATE(
AVERAGEX('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]),FILTER('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]=BLANK()))

and


MaxDeleteBucketGap =
AVERAGE('Random_Tests_Buckets'[Sleep Day])
I don't get an error but I don't get any value either.
Any help will be much appreciated.
Nadav

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @nadavsn 

AVERAGE and AVERAGEX already ignore blanks. With your first piece of code you are keeping only thre blanks for the AVERAGEX:

MaxDeleteBucketGap = CALCULATE(
AVERAGEX('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]),FILTER('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]=BLANK()))

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @nadavsn 

AVERAGE and AVERAGEX already ignore blanks. With your first piece of code you are keeping only thre blanks for the AVERAGEX:

MaxDeleteBucketGap = CALCULATE(
AVERAGEX('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]),FILTER('Random_Tests_Buckets','Random_Tests_Buckets'[Sleep Day]=BLANK()))

 

Thanks!

It turned out to be a slicer problem. 

AVERAGE and AVERAGEX do ignore BLANK.

 

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.

Top Solution Authors