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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
afos111
Frequent Visitor

Average thinking no data is zero

Hello all,

 

Below is shown a matrix of 5 different matrixes "PLANT FPY" is an average of the first four.

the blanks shown have zero data as no product was ran in the area thus resulting in zero data and the average is taking it as zero.

Is there any way i can have the average not count areas that have no data?

 

 

afos111_0-1664928337145.png

 

1 ACCEPTED SOLUTION

Hi , @afos111 

Here are the steps you can refer to :

(1)This is my test data , i put three measures in the visual :

vyueyunzhmsft_0-1664937452440.png

(2)We can create a measure :

Measure 5 = var _count =IF( [Measure 2] <> BLANK() ,1 ,0)+IF( [Measure 3] <> BLANK() ,1 ,0)+IF( [Measure 4] <> BLANK() ,1 ,0)
return 
DIVIDE( [Measure 2]+[Measure 3]+[Measure 4] , _count)

(3)Then we can ignore the BLANK() data to calculate the average of the three measures:

vyueyunzhmsft_1-1664937496844.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

3 REPLIES 3
afos111
Frequent Visitor

*five different measures

Hi , @afos111 

Here are the steps you can refer to :

(1)This is my test data , i put three measures in the visual :

vyueyunzhmsft_0-1664937452440.png

(2)We can create a measure :

Measure 5 = var _count =IF( [Measure 2] <> BLANK() ,1 ,0)+IF( [Measure 3] <> BLANK() ,1 ,0)+IF( [Measure 4] <> BLANK() ,1 ,0)
return 
DIVIDE( [Measure 2]+[Measure 3]+[Measure 4] , _count)

(3)Then we can ignore the BLANK() data to calculate the average of the three measures:

vyueyunzhmsft_1-1664937496844.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

thank you! this worked great, ill definetly be using this in the future.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.