The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
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()))
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.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |