Forum Discussion
SUM of Distinct Rows
- 9 years ago
Should be something along the lines of:
Measure = CALCULATE(AVERAGE([Run Duration]),FILTER(Table,[Run Date]>TODAY()-7))
Should be something along the lines of:
Measure = CALCULATE(AVERAGE([Run Duration]),FILTER(Table,[Run Date]>TODAY()-7))
At first glance, this doesn't appear to address the one-to-many relationship between the SQL Job and underlying steps.
It's a good first step, I'll see if I can use this.
- Greg_Deckler9 years agoCommunity Champion
You would put SQL Job and this Measure in a table. If you have the relationship built between them, then the context should be correct and you will get the right answer.
- vbiqvitovs9 years agoFrequent Visitor
The issue with this is that the duration specified in the data table is the duration of each step, instead of the higher-level job. This would only be a working solution if I wanted to get the average duration of the sub-steps, and not the job itself. I first need to sum all steps based on their association to the SQL job.
- Greg_Deckler9 years agoCommunity Champion
Oh, can you post some data from your other table so that I can replicate this and get it working?