Forum Discussion

Mikaseido1's avatar
Mikaseido1
Frequent Visitor
1 year ago
Solved

NEED HELP // ERROR AL CONTAR

Buenas noches,    Estoy tratando de contar la columna con nombre numIdentificacionHogar, la cual contiene valores repetidos y se debe contar lo que no se repita.   Existe otra columna con nombre ...
  • v-pnaroju-msft's avatar
    1 year ago

    Hi Mikaseido1,

    Thank you for reaching out to us through the Microsoft Fabric Community Forum.

     

    In addition to the response provided by Omid_Motamedise  and wini_R , please find below the solution using DAX to accurately count the total number of distinct households across all territories.To achieve this, we can create a measure using the DISTINCTCOUNT function.

    The DAX measure is as follows:

    CountHouseholdsByTerritory = DISTINCTCOUNT(Sampledata_101220224[NumIdentificationHome])  
    

    Place the Measure in the Table Visual

    • Add the column to the Rows section of your table visual.NameTerritory
    • Add the measure to the Values section.CountHouseholdsByTerritory

    This setup will display the distinct count of households for each territory in the respective rows and the total distinct count across all territories in the grand total row.

     

    Please refer to the attached screenshot:

     

    If you find this post helpful, kindly mark it as the solution to assist other members in locating it easily.

     

    Regards,

    Pavan.