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

Matrix subtotal excluding "0" values?

Hi everyone, 

 

I know there are severals post with similar doubts but no one is suitable for my problem.

 

I have a Matrix-table like below wich is showing the average in the subtotals rows, what I would like to know what is the DAX formula to exclude the "0,00s" values from this subtotal-average, but not with a filter excluding the "number 5" because today number 5 doesnt have values but it will have them in a close future.

 

bad subtotal.PNG

 

 

 

 

 

 

 

 

 

 

 

 

Are there any way to do that? There are similar problems on the forum but not the same.

 

Any help will be really appreciate it.

 

Thank you in advance.

 

Kind regards

 

ICR

1 ACCEPTED SOLUTION

Hi @ICRdatalover ,

 

Please download a demo from the attachment. 

1. If you don't want to transform your data, you can create 7 measures like below.

Value1Measure =
CALCULATE ( AVERAGE ( 'Sample'[value1] ), 'Sample'[value1] <> 0 )

2. I would suggest you transform the data structure. 

Measure =
CALCULATE ( AVERAGE ( Table1[Value] ), Table1[Value] <> 0 )

Matrix-subtotal-excluding-0-values

 

Best Regards,

Community Support Team _ Dale
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

10 REPLIES 10

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.