I am trying to calculate a global average of jobs performed per each engineer for all jobs after a set date. This number should not change at all as other filters/slicers are operated. I can get it stable for various column filters, but cannot get the date stable for some reason. My full function is more complicated than this, but think this sums up the issue.
Line Count is just countrows(S&R Data)
With no filters applied to the visual i see this. Firstly rows form before 1/6/19 and secondly the value for 1/6 of 2.05 is completely wrong
https://www.dropbox.com/s/icjx1k7bq4h6a29/Capture.JPG?dl=0
If i add a filter on the visual for schedule day >=1/6/19 as well i see the correct numbers
https://www.dropbox.com/s/1lc0lxxd2nc12u5/Capture3.JPG?dl=0
Below is the underlying data by engineer so 25/8 is 3.125
https://www.dropbox.com/s/241mt5wn35g2os6/Capture2.JPG?dl=0
I can add other columns filters from the same table and works fine, but just not for date. I assume this is because i am suing date in my output table and this is somehow overruling the date entered into the filter. Is there anyway to calculate an ALL type measure over multiple dates, but then use it in another measure that is displayed in a date type visual? My objective here is to work out the average lines per engineer globally and then calculate if a specific engineer is doing more or less in a particular month. So its measure X for Engineer A in Month C/Average of Measure X over ALL(Engineers) for last 6 months
Any advice appreciated
Mike
Code:
[COLOR=#000000][FONT=Consolas]line count test = CALCULATE(AVERAGEX([/FONT][/COLOR]
[COLOR=#000000][FONT=Consolas] SUMMARIZE(
FILTER(
CALCULATETABLE(ALL('S&R Data')),
'S&R Data'[Schedule Date]>=DATE(2019,6,1)
),
'S&R Data'[Engineer]
) ,
[Line Count]
[/FONT][/COLOR]
[COLOR=#000000][FONT=Consolas] ) ) [/FONT][/COLOR]
Line Count is just countrows(S&R Data)
With no filters applied to the visual i see this. Firstly rows form before 1/6/19 and secondly the value for 1/6 of 2.05 is completely wrong
If i add a filter on the visual for schedule day >=1/6/19 as well i see the correct numbers
https://www.dropbox.com/s/1lc0lxxd2nc12u5/Capture3.JPG?dl=0
Below is the underlying data by engineer so 25/8 is 3.125
https://www.dropbox.com/s/241mt5wn35g2os6/Capture2.JPG?dl=0
I can add other columns filters from the same table and works fine, but just not for date. I assume this is because i am suing date in my output table and this is somehow overruling the date entered into the filter. Is there anyway to calculate an ALL type measure over multiple dates, but then use it in another measure that is displayed in a date type visual? My objective here is to work out the average lines per engineer globally and then calculate if a specific engineer is doing more or less in a particular month. So its measure X for Engineer A in Month C/Average of Measure X over ALL(Engineers) for last 6 months
Any advice appreciated
Mike