Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Hiding blank rows & Columns

Hello All,

I would be grateful if someone can let me know a way to hide blank rows and columns in a matrix visualization of Power BI.

Service-line and country are columns from a table but the values are Measures.

 

Service line

USACanadaMexicoUKFrance
Finance11 11
Accounting     
Development11 33
Marketing11 11

 

Serviceline is present in a table called "Value" were as Country name is present in a table called "Country". 

 

I tried hiding the column by selecting "Wrap word" on and then hiding Mexico but I would like to know if there is a query to hide blank rows or columns.

 

Thanks,

ShriHanuman.

11 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is there a query or any other way to hide blank rows or columns?

      • camargos88's avatar
        camargos88
        Community Champion

        Hi Anonymous ,

         

        I have a situation like that:

         

        Which operation are you doing ?

         

        Measure = SUMX('Table (2)'; IF('Table (2)'[Country] = "Mexico";BLANK(); 'Table (2)'[Value]))
         
        Ricardo
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for asking.

      Every month or year the data keeps changing and there can be a value in the Service line say "Accounting"  this month but next month this may be blank. Similarly, the location say "Mexico" may have value or may not have value. So, I would like to know a way to filters/ hide/not show blank rows and columns. 

       

      Accounting and Mexico are just for example and I cannot use hardcoded formulas that refers to just one country or service line :

      example: 

      Measure = SUMX('Value', IF(RELATED(Country[Country]) = "France", BLANK(), 'Value'[Value]))
       
      Let me know if this helps. Sorry for the confusion. I just started using Power BI.
       
      Regards

       

       

      • camargos88's avatar
        camargos88
        Community Champion

        Anonymous ,

         

        If the column/row is entirely blank, the visual will hide it by default.

         

        Ricardo