Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

calculate defect rate with DAX

I need to calculate defect rate for every month. I usually divide the number of defect by the number of monthly delivery. Then, what is the DAX expression for this?

  • Stachu's avatar
    Stachu
    7 years ago

    create a separate table with date to join between the 2 tables, use month from that table

    for the measure try this, just adjust the table names

    Measure = 
    DIVIDE(SUM(Table1[Rated Complaint]),SUM(Table2[Qty in Un. of Entry]))

     

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      They are in different tables. I need to divide the number of Rated Complaint of January by the number of Qty of January.

      • Stachu's avatar
        Stachu
        Icon for Community Champion rankCommunity Champion

        create a separate table with date to join between the 2 tables, use month from that table

        for the measure try this, just adjust the table names

        Measure = 
        DIVIDE(SUM(Table1[Rated Complaint]),SUM(Table2[Qty in Un. of Entry]))