Forum Discussion

Rabur116's avatar
Rabur116
Frequent Visitor
6 years ago
Solved

Distinct Count of Object Per Type and Date

Hi,   I have this table where I need to count the Grand Total number of object by date: Object Name Object Type Date abcvm1 ahv 3/26/2020 abcvm2 vmw 3/26/2020 bcdvm1 ahv 3/25/2...
  • Ashish_Mathur's avatar
    6 years ago

    Hi,

    You may download my PBI file from here.

    Hope this helps.

  • v-easonf-msft's avatar
    6 years ago

    Hi , Rabur116 

    Try steps as below:

    1.create a calculate table:

    Table 2 = DISTINCT('Table'[Object Type])

    2.create a mesure as below

    value1 =
    SUMX (
        GROUPBY (
            FILTER ( 'Table', 'Table'[Object Type] IN DISTINCT ( 'Table 2'[Object Type] ) ),
            'Table'[Date],
            'Table'[Object Type]
        ),
        IF (
            ISBLANK ( CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) ) ),
            0,
            CALCULATE ( DISTINCTCOUNT ( 'Table'[Object Name] ) )
        )
    ) + 0

    It will show as below:

     

    Here is  a demo

    pbix attached

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.