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

Hide rows with zero or blank in columns

I have created at small model in PowerPivot. The result is shown in this pivot table.  My question is:

 

How do I hide the rows where there is zero or blank in all colums (measures)? I have shown an example below.  Rows marked with yellow should not be shown.

 

I hope some of you just can come up with a hint and then I can take it from there.......

Test (2).png

/ Søren (Denmark)

 

PS: I guess the solution is the same whether I am working 

1 ACCEPTED SOLUTION

but it looks like the row you want to remove does not have all the columns blank... 
you might start by creating measures that use ISBLANK() to return a result for each of the columns your interested in, ex. col1_blank = if(ISBLANK('some_table'[col1]),0,1)

and then a measure that uses those measures to check all the columns

If (col1_blank && col2_blank && col3_blank && col4_blank)

then filter the table based on the result of that measure

here is a suggestion from another post about how to do that

If I understand you correctly, you should be able to use the formula below to create a new measure, then use it as a visual level filter("Sum of ALL Measures" is greater than 0) to hide row "Strawberries A" on the Table visual in your scenario. Smiley Happy

Sum of ALL Measures =
[Begin Stock] + [Purch. today]
    + [Sales today]
    + [End Stock | Purch. tomorrow]
    + [Sales tomorrow]
    + [End Stock tomorrow]

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

2 REPLIES 2
kentyler
Solution Sage
Solution Sage

You might check out this

ALLNOBLANKROW

  1.  

From the parent table of a relationship, returns all rows but the blank row, or all distinct values of a column but the blank row, and disregards any context filters that might exist.

Syntax

DAXCopy
ALLNOBLANKROW( {<table> | <column>[, <column>[, <column>[,…]]]} )  

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


but it looks like the row you want to remove does not have all the columns blank... 
you might start by creating measures that use ISBLANK() to return a result for each of the columns your interested in, ex. col1_blank = if(ISBLANK('some_table'[col1]),0,1)

and then a measure that uses those measures to check all the columns

If (col1_blank && col2_blank && col3_blank && col4_blank)

then filter the table based on the result of that measure

here is a suggestion from another post about how to do that

If I understand you correctly, you should be able to use the formula below to create a new measure, then use it as a visual level filter("Sum of ALL Measures" is greater than 0) to hide row "Strawberries A" on the Table visual in your scenario. Smiley Happy

Sum of ALL Measures =
[Begin Stock] + [Purch. today]
    + [Sales today]
    + [End Stock | Purch. tomorrow]
    + [Sales tomorrow]
    + [End Stock tomorrow]

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


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.