Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Table shows no data with 0

Hi all,

 

I'm having a trouble with the table that I'm using in my report.

 

The data that I received is the following:

 

There is also a 'Person D' wich has no active devices on his name.

 

Now what I want is an Table where also the following is shown:

Agent                                       Number of active devices

Monten Joris                            3

Person A                                   3

Person B                                   4

Person C                                   2

Person D                                  0

 

Now i've created the table by using the count(distinct) but then Person D isn't shown becaus of the value 0.

 

Is there an way to let Person D also shown in the table?

The option 'Show data with no data' isn't an option.

 

Thanks!

  • Anonymous,

     

    You may refer to the following DAX that creates a new table.

    Table =
    SUMMARIZECOLUMNS (
        Table1[Agent Name],
        "Count", CALCULATE (
            DISTINCTCOUNT ( Table2[Active Devices] ),
            FILTER ( Table2, Table2[Agent Name] = MAX ( Table1[Agent Name] ) )
        )
            + 0
    )
    

6 Replies

  • jthomson's avatar
    jthomson
    Icon for Solution Sage rankSolution Sage

    Try creating a measure that counts the instances of each agent you have and stick +0 on the end of it?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Can you be my guidance for this?

      • jthomson's avatar
        jthomson
        Icon for Solution Sage rankSolution Sage

        I've just seen this as a work around for a few things where a visual shows as blank - I assume you've got your agents in some sort of related table to the data you displayed, if you look up how the countrows function works and run that across your data that should be a starting point