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

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

Reply
Afiq_Danial
Helper II
Helper II

Removing rows with all zeros

Hi,

I need to replicate this table into the power bi matrix. The current matrix that i have right now looks like this.

Afiq_Danial_0-1666616742521.png

 

I need to remove the staffs with all zeros within the filtered date. Since Suzy and Andy has 0 for all the dates, i want them removed. The matrix that i want to create should be like this.

Afiq_Danial_2-1666616853288.png

 

Thank you!

 

4 REPLIES 4
Anonymous
Not applicable

Hi  @Afiq_Danial ,

I created some data:

Table:

vyangliumsft_0-1666681080576.png

vyangliumsft_1-1666681080582.png

Here are the steps you can follow:

1. Create measure.

Flag =
var _table=SUMMARIZE('Table','Table'[Name],"sum",SUM('Table'[Amount]))
return
IF(
    MAX('Name Table'[Name]) in SELECTCOLUMNS(FILTER(_table,[sum]<>0),"1",[Name]),1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1666681080583.png

3. Result:

vyangliumsft_3-1666681080585.png

 

Best Regards,

Liu Yang

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

Appreciate your help, i didnt tell this earlier but the way i got the values "1" and "0" is by using measures. So your method is not applicable to me. Thanks btw!

 

menglaro78
Microsoft Employee
Microsoft Employee

HI,

what data model are you using?
All in one table?

 

If you use a Star Schema data model the native behavior of Power Bi is that of your second image.

In this case in TableFact you have only Row with qty = 1
Matrix.pngModel.png

If you have this situation in Table Fact

FactTable.png

 

You can use Filters on this visual Sum of QTY is greater than 0

Filter.png

 

Marco

Hi, for the name and dates, its in two seperated tables. However for the "1" and "0", I've created a measure to get the outcome. The one i shared here is just a simple data and easier to understand. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.