Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Summarize multiple variables

Hi,   I need to calculate the standard hours per MFG_ORDER_NAME. This calculated value per individual line is OK, but the sum is incorrect. I tried summarize function but I need help ons this.   ...
  • Greg_Deckler's avatar
    Greg_Deckler
    7 years ago

    I would probably go with something like:

     

    Measure Total =
    VAR __table = SUMMARIZE('Table',[MFG_ORDER_NAME],[DEPARTMENT],[BASIS],"__hrsStandard",[HRS STANDARD])
    VAR __total = SUMX(__table,[__hrsStandard])
    RETURN
    IF(HASONEVALUE([DEPARTMENT]),[HRS STANDARD],__total)

    You may have to modify the SUMMARIZE.