Forum Discussion

roboskoog's avatar
roboskoog
Frequent Visitor
9 years ago
Solved

Summarizing monthly data

Hello All -

 

I've been struggling with creating a monthly summary of defects detected.  My table has Project ID, Application ID, Month and Discovered defects.  I need to summarize the discovered defects by application and month.  Since an application can be tied to multiple projects in a month, I need Project ID to filter which applications should be included in the display.

 

I've tried mulitple things and cannot get a monthly total by application, including SUMMARIZE, SUM, SUMX, GROUPBY, SUMMARIZECOLUMNS.  Usually I get the message: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."  I'm thinking this is because I do not including the Project ID in the calculation.  

 

Any suggestions on how to get monthly totals by application?

  • Using the suggested posting, I was able to get this to work.  Actual code is:

     

    SUMX(CROSSJOIN(values('Reliability by Appllication (2)'[Appl_ID]),values('Reliability by Appllication (2)'[Reporting Month])),CALCULATE(SUM('Reliability by Appllication (2)'[Discovered Defects])))

     

    I now get a monthly total of defects by application.

     

    Thanks for the suggestion.

2 Replies

    • roboskoog's avatar
      roboskoog
      Frequent Visitor

      Using the suggested posting, I was able to get this to work.  Actual code is:

       

      SUMX(CROSSJOIN(values('Reliability by Appllication (2)'[Appl_ID]),values('Reliability by Appllication (2)'[Reporting Month])),CALCULATE(SUM('Reliability by Appllication (2)'[Discovered Defects])))

       

      I now get a monthly total of defects by application.

       

      Thanks for the suggestion.