12 Replies Latest reply: Oct 20, 2017 12:36 PM by Linda Pembroke RSS

    Set Analysis - overall sum by month

    Linda Pembroke

      Hi,

       

      Please see the table below:

       

      For the Num column I am currently using this expression to sum the PHARM_NUM_STATUS based on selections and to show a YOY comparison and it is working.

       

      =Sum({<PHARM_Year, PHARM_MonthNum = {"=PHARM_MonthNum = Max(TOTAL <PHARM_Year> Aggr(PHARM_MonthNum, PHARM_Year))"}>} PHARM_NUM_STATUS)

       

      But now for the CP Num  column I am needing to show the overall sum of all data as a comparison, even when a selection is made. I tried

      =Sum({<PHARM_Year, PHARM_MonthNum = {"=PHARM_MonthNum = Max(TOTAL <PHARM_Year> Aggr(PHARM_MonthNum, PHARM_Year))"}>} {1}PHARM_NUM_STATUS)

      but this is summing all PHARM_NUM_STATUS for the entire year.

       

      Any help is appreciated.