Search code examples
powerbidaxpowerbi-desktop

create a measure count of values and blank in a column with dax


I have these columns and I want to create a measure to calculate the number of types

types

ID Type 1 A 2 A 3 B 4 C 5 D 6 A 7
8

Results : A 3 B 1 C 1 D 1 Blank 2


Solution

  • Try this Calculated Table:

    Results = 
    SUMMARIZE(
        'Table',
        'Table'[Type],
        "Count", COUNT('Table'[ID])
    )
    

    enter image description here