Forum Discussion

Jgrohows's avatar
Jgrohows
Frequent Visitor
3 years ago
Solved

Summarize and visualize distinct count on multiple columns

Hello!   I am struggling to figure out a way to summarize and visualise an ask that involves determining distinct counts on multiple columns. Lets say i have a list of Employee #, Country and City ...
  • onurbmiguel_'s avatar
    3 years ago

    hello Jgrohows

    Is this the output wanted ?

     

    I creat one column and one mesure: 

     

    No of countries = 
    -- Column 
    var _name = 'Table'[Name]
    
    var _value = 
        CALCULATE(
            DISTINCTCOUNT('Table'[Country]),
            ALL('Table'),'Table'[Name] = _Name
        )
    
    return 
    _value

     

    Total of persons = 
    -- Measure 
    DISTINCTCOUNT('Table'[Name])

     

    check the solution in this LINK

     

    Best regards

    Bruno Costa | Solution Supplier

     

    Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! ๐Ÿ‘

    Take a look at the blog: PBI Portugal