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
Frost
Frequent Visitor

New table filter including zero

I have a table of 15 rows with two columns (A+B), where A has values from zero to five (3 rows zero and 7 rows with values=10 rows) but also some blank values (5 rows). I want to create a new table where I filter out only blanks, but including 0-5 using:

 

  1. Table = FILTER (Sheet1, Sheet1[A] <> BLANK ()) - gives me no blanks and no zeros (7 rows)
  2. Table = FILTER (Sheet1, Sheet1[A] <> BLANK () || Sheet1[A]=0) - gives me all values including blanks and zeros (15rows)???

 

I added a column in the original table:

 

CheckNumberOfNoBlanks =
CALCULATE (
    COUNTA ( Sheet1[A] ),
    FILTER (Sheet1, Sheet1[A] <> BLANK () || Sheet1[A] = 0)
)

 

which gives me the correct number of NoBlanks (10 rows) but for some reason this does not work when creating the Table?

 

Any help to get me out of confusing state...

 

 

 

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

@Frost

 

use

 

if(isblank(column), "value if blank", "value if not blank")





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

@Frost

 

use

 

if(isblank(column), "value if blank", "value if not blank")





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks, but is there a way to do this without creating a extra column in the original table? I have a number of these to filter out...

Frost
Frequent Visitor

....and yes there is:

 

Table = Filter(Sheet1, if(ISBLANK(Sheet1[A]), FALSE(), TRUE()))

 

Thanks for your help!

@Frost ok so just so understand what you trying to do, you trying to create a new table based on the condition that nothing is blank?

 

how are you creating the new table?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.