Forum Discussion

king5six1's avatar
king5six1
Regular Visitor
7 years ago
Solved

Help with COUNTIFS Formula in DAX

Hello. Newbie here. I have a problem I have been trying to solve to no avail. I have a COUNTIF formual in excel that is returning a percentage based on several columns. I cannot get this working in D...
  • v-danhe-msft's avatar
    v-danhe-msft
    7 years ago

    Hi king5six1,

    Based on my test, you could use the Count function to calculate the percentage:

    Sample data:

    Create a measure:

    Measure = CALCULATE(COUNT(Table1[N]),FILTER('Table1','Table1'[N]=1))/CALCULATE(COUNT(Table1[Q]),FILTER('Table1','Table1'[Q]=1))

    Result:

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He