1 Reply Latest reply on Jan 24, 2018 4:23 AM by lenaic.ridinger

    LOD Calculation - Average across days, WITH additional Filter

    Nikolas Walker

      Hi folks,


      New to using LOD calculations on Tableau so still getting to grip with them.


      Problem: I'm trying to get a daily average of work items received across a date range. However there is also a secondary filter depending on "Group" that the work items were received into and the calculations needs to change depending on group (Different dashboards.)


      GroupWork Item
      Date Received
      Group 1WI116-01-18100
      Group 1WI216-01-1850
      Group 1WI117-01-18200
      Group 1WI217-01-18100
      Group 2WI316-01-1850
      Group 2WI416-01-18200
      Group 2WI317-01-1830
      Group 2WI417-01-1860


      So I'd realistically be able to get a text field that would change as dates were selected (If 16-01 is selected it'd give 75 and if 17-01 were selected it'd give 150) BUT would need to be able to switch between the groups if another one is selected, so if I selected Group 2, it'd ignore all the Group one details and give me just that.


      I hope that makes some semblance of sense to one of you guys! Any help would be greatly appreciated. I also hope this is posting in the right place, as I can't seem to find the "Post new topic" bit.


      EDIT: I've got the calculation down to a tee... which is "{FIXED DATETRUNC('day', [Date Received]) : AVG([Received])}" but this just doesn't change with groups!





      {FIXED DATETRUNC('day', [Date Received]) : AVG([Received])} <--- that's the code I've used. I've set the Calculation to AVG in the tray so it works over a time period as well.