Forum Discussion

ZW's avatar
ZW
Frequent Visitor
4 years ago
Solved

CountIf Per Row

Hi, I was hoping someone could help me with a CountIf equivilanet in Power BI.    I would like to count the number of n/a's per row, to then formulate a percentage of how many data fields have been...
  • amitchandak's avatar
    4 years ago

    ZW , then you have to try a measure like

     

    Divide(
    countx(filter(Table, Table[Name] ="N/A"), [Name])
    +countx(filter(Table, Table[Birthday] ="N/A"), [Birthday])
    +countx(filter(Table, Table[Nationality] ="N/A"), [Nationality])
    +countx(filter(Table, Table[Gender] ="N/A"), [Gender])
    +countx(filter(Table, Table[Age] ="N/A"), [Age])
    +countx(filter(Table, Table[Occupation] ="N/A"), [Occupation])
    +countx(filter(Table, Table[Address] ="N/A"), [Address]),
    countrows(Table)*7)