1 Reply Latest reply on Jul 20, 2016 6:18 PM by Manideep Bhattacharyya

    Need help creating a calculated field to summarize values across multiple data sources

    Carlos L

      I have a school data set which contains several data sources - teachers, classes, students, advisers, etc. Multiple teachers can become an adviser to a class.


      I'm trying to create a calculated field under the classes data source which will tell me how many advisers there are for a particular class, but having trouble referencing different data sources in the calculation.



      - TeacherID



      - AdviserID

      - TeacherID

      - ClassID

      - IsAdviser (either 1 or 0)



      - ClassID

      - new calculated field (NumberOfAdvisers)


      I'm thinking the calculated field should be created in the ClassesData data source, and is calculated thusly -

      NumberofAdvisers = sum of AdvisersData.IsAdviser where (ClassID = AdvisersData.ClassID)


      Is there a for loop or aggregating function I can use to get the above field?