Forum Discussion

KarmenN's avatar
KarmenN
Regular Visitor
3 years ago
Solved

DAX calculation

Hello!   I am trying to find out how to calculate "rate for not OK products", so I created a sample data.   I have 2 main tables: 1)All produced orders, together with production operations, date...
  • MarkLaf's avatar
    3 years ago

    Make sure you use the fields from your dimension tables ('Description1', 'list of allMO-s') and then you should be able to drop the below measure in to get what you want (if I'm understanding your requirements).

    rate for not OK products =
    DIVIDE( COUNTROWS( 'QA data' ), COUNTROWS( 'tehtud MO-d' ) )

    Note that this is just counting the related rows. If you have value columns in 'QA data' and/or 'tehtud MO-d' that you want to sum, then replace the COUNTROWS on a table with SUM on a column (e.g., SUM( 'QA data'[Total_QTY] ) )

     

    To get the percent formatting, use the measure formatting settings: