Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Show column header for no value (no data row)

hi team,

 

normally with dates i can use reference table or tick show item with no value. when i have data missing and this would be fine.

 

however, i have a new issue, i have a matrix is based on sites. however for last week that site did not report anything new and when i filter the matrix changes and removes the that site since the value doesnt exist at all. 

 

i try a reference table using table = distinct(table1[site]) and connect it back with 1 way cross filter and use this field instead of the orginal however it still does the same thing. 

 

im not sure how to cater for this sernario, any help would be appreciated.

 

PS. I already cater for blank values in my measures and calulated colums

 

 

 

 

 

 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    The information given by you is inadequate. But in such cases where a matrix removes rows with blank values and when people do not want that row to be removed, usually people add a zero to that measure. As a result of adding zero, instead of blank(), the measure will report 0 and therefore it will be visible in the matrix with the value 0.

     

    For example, 

    TestMeasure = SUMX(<sometable>,<expression>) might return blank and therefore those rows with blank values will be removed from the matrix. So change the measure to the following...

     

    TestMeasure = SUMX(<sometable>,<expression>)+0

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi my calculated colum is Column = DIVIDE(value1,value2,0) which should give 0 as an alternate result.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        I am assuming that you are using a measure in your visual. 

         

        It is true that the calculated column will give an alternate value of 0. But when you use an aggregation of any column in a measure, there will be a filter context and it will bring zero only if there are some records for those websites that are visible in the matrix (based on the filter context). 

        In case a website does not have data for a particular period, it does not matter whether the calculated column using DIVIDE gives 0 or not, the measure will return blank() unless you change it because there won't be any record pertaining to the filtered websites in the table for that period.

         

        It will be better if you post your DAX code here so that someone can take a look and figure out what is going wrong. What I have mentioned is a general idea based on the limited info you gave.