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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tim_001
Helper I
Helper I

Power BI Matrix Visual to show 0 values in row subtotal but not in drill through

Hi, 

I have a Matrix Table with Sales Information by Sales Rep, State and year. To keep the same layout so that every year is visible I created a SUM measure of the Sales to show 0 values. 

 

This is how the matrix looks with SUM measure - which is good on the highest level and how I want it: 

 

 202020212022
Tim100005000
Tom00500
Theodore040008000

 

 

Now, if I drill through to see in which states how much was sold - it looks like this: 

 

 202020212022
Tim100005000
Alabama50000
Alaska000
Arizona000
Arkansas000
California000
Colorado000
Connecticut000
Delaware000
Florida950000
Georgia05000
Tom00500
Theodore040008000

 

But I would like to have it look like this - without the 0 values in the drill through:

 

 202020212022
Tim100005000
Alabama50000
Florida950000
Georgia05000
Tom00500
Theodore040008000

 

It might be something simple that I am just not seeing right now - But I appreciated any support, idea or comment. 

 

Thanks a lot

Tim

2 ACCEPTED SOLUTIONS
Jai-Rathinavel
Super User
Super User

@tim_001 To fix this you can create another measure to check if the row has a sale value for all the years or not. 

 

1. Create a measure like below

Has Sales ? = IF([Sum of Sales] <> 0, 1, BLANK())

2. Now add this measure to your matrix's visual filter pane.

3. Set the Has Sales ?  measure filter to 1

4. Now you should not rows with the all the years as 0 sales

 

Thanks,

Jai

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Selva-Salimi
Super User
Super User

Hi @tim_001 ,

 

you can write a measure as follows:

 

measure X := var tbl=summarize (your_table, sales_rep, state, year, "sl_amount", sum(your_table[sales]))

return

if(sumx(tbl, sl_amount)=0,0,1)

 

now you can use this measure in the filter pane of your matrix visualization and set it to 1. in this cse, you can have your prefered output.

 

If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

 

 

View solution in original post

14 REPLIES 14
v-pgoloju
Community Support
Community Support

Hi @tim_001,

 

Just following up to see if the Response provided by community members were helpful in addressing the issue.

If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @tim_001,

 

Just following up to see if the Response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

 

Best regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @tim_001,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @Yashwanthsathya , @Jai-Rathinavel@Jai-Rathinavel and @Selva-Salimi  for prompt and helpful responses.

 

Just following up to see if the Response provided by community members were helpful in addressing the issue.

If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

Selva-Salimi
Super User
Super User

Hi @tim_001 ,

 

you can write a measure as follows:

 

measure X := var tbl=summarize (your_table, sales_rep, state, year, "sl_amount", sum(your_table[sales]))

return

if(sumx(tbl, sl_amount)=0,0,1)

 

now you can use this measure in the filter pane of your matrix visualization and set it to 1. in this cse, you can have your prefered output.

 

If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

 

 

Jai-Rathinavel
Super User
Super User

@tim_001 To fix this you can create another measure to check if the row has a sale value for all the years or not. 

 

1. Create a measure like below

Has Sales ? = IF([Sum of Sales] <> 0, 1, BLANK())

2. Now add this measure to your matrix's visual filter pane.

3. Set the Has Sales ?  measure filter to 1

4. Now you should not rows with the all the years as 0 sales

 

Thanks,

Jai

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @Jai-Rathinavel - I applied suggestion and it works well to show 0 values in the rows but in the drill down only the states with sales.

 

The only issue occuring now is that if Tim, Tom or Theodore have no Sales, they are not shown at all in table. I would like to see them in the row with all 0 values, so that they are still existing but did not make any Sales in those years. 

 

Can I tweak the formula for it?

@tim_001  It would be greate if you can help me with a sample data. If you are looking for Yearly Sales you can refer the below formula

Yearly Sales = CALCULATE([Sum Sales], ALLEXCEPT(Sales, Sales[Year])

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@Jai-Rathinavel 

 

Data looks like this for instance - but the issue is if I use your workaround - Tom would disappear in below table because he did not sell anything. 

202020212022
Tim100005000
Alabama50000
Florida950000
Georgia05000
Tom000
Theodore040008000

@tim_001 Replace your existing measure filter expression with this and see if this helps

Has Sales ? = IF(ISINSCOPE(States[State]), IF ( [Sum Sales] <> 0, 1, BLANK() ),1)

 

Thanks,

Jai




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@Jai-Rathinavel Thanks for the suggestion and continous support. Unfortunately, Tom remains with 0 values invisible.

 

I manage to get the visual if I use blanks instead of "0" but for the visual I prefer to show zeros instead of blanks. I think that is complicating it and not sure if it is possible. I tried with a dim table and it works so far, but again only if I just use the Sum and not Sum +0 to show in the table 0 values instead of blanks

Royel
Solution Sage
Solution Sage

Hi @tim_001 i can see @MasonMA  give you an easy fix you can try this. Just a quich correction in the dax 

Corrected DAX 

Sales = 
IF(
    SUM(Sales[Amount]) = 0,
    BLANK(),
    SUM(Sales[Amount])
)

use it and let us know your progress. 

Thanks 

 

Selva-Salimi
Super User
Super User

Hi @tim_001 ,

 

it seems that you use a dimension table values in drill through (they are not from the same table) or different columns in measure and visual. if not, please share your measure.

 

If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Yashwanthsathya
Regular Visitor

Create a measure that would look like this :

VAR Sales_Original = SALES
VAR Sales_Custom = IF(SALES = 0, BLANK(), SALES)
IF(
ISINSCOPE(Sales_Rep), Sales_Custom, Sales_Original
)

This should display the Sales with 0 as  BLANK for the Sales_Rep in drill down. Let me know if this worked.
----
Yash

MasonMA
Community Champion
Community Champion

  

Hi, the regular approach would be to create a Measure like 

 

_Sales = 

IF ( SUM ( Sales[Amount]) = 0,

     BLANK(),

     SUM ( Sales[Amount]))

 

In your matrix, replace the current measure with _Sales.

Then go to Matrix visual settings, switch on 'Show items with no data' only for Year but not for State. This way every year shows for each rep, but states with no sales will stay hidden.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors