Forum Discussion

SBR1D's avatar
SBR1D
Helper III
2 years ago
Solved

understanding countx and sumx

Hi All   I am trying to understand how countx and sum x works. In the matrix how is the sum x example 1 total 279?  The columns that use countx make sense The In progress count column i don't get...
  • amitchandak's avatar
    2 years ago

    SBR1D , Based on what I got. Check meaning in comment

    Use calculate when you use calculation in expression when you use a formula else use measure

    count x example 1 = COUNTX(LearningPlan,calculate(COUNT(LearningPlan[LearnerID]))) // This one just count the row value and count it again

    Better to use COUNT(LearningPlan[LearnerID])

     

     


    sum x example 1 = sumx(VALUES(LearningPlan[Employer name]),calculate(COUNT(LearningPlan[LearnerID]))) // Do the count till employee name level and post that sum

     

    sumx(VALUES(LearningPlan[Employer name]),[count_x test])

    // Do the count till employee name level and post that sum

     

    in progress count = COUNTX(VALUES(LearningPlan[EmployerID]),CALCULATE(COUNT(LearningPlan[EmployerID]),LearningPlan[Status] = "In Progress"))
    // Do the count till employee name level and post that count again, means every value will be treated as 1