5 Replies Latest reply on Sep 13, 2018 8:52 AM by Mahfooj Khan

    Aggregate Table calculation

    christopher berger



      So, I have a hurdle that I can't overcome with table calculations. Basically, I have a SQL table that records state changes for devices. Everytime, a device changes state an entry is made in the table indicating the state it entered, a date/timestamp and a unique ID. The problem statement I have is that we want to compute how long has a given device spent in a state and then show the percent of total for each state. In my novice mind I'd create a table calculation to calculate the time difference between to the next state to know how long the device was in a state and then use LOD to aggregate the calculation to the state level. Unfortunately, that cannot work and now I am stuck not knowing how to aggregate the table calc. I have attached the workbook and below are two screenshots illustrating what I have and where I need to get:




      Any help would be greatly appreciated. I have posted on this before but only asked for half of what I needed. My bad!