Forum Discussion
AVERAGEX over a virtual table and REMOVEFILTERS
Hi Guys,
I am trying to create a measure that is not filtered by multiple slicers on my report, however, I am finding this difficult to resolve.
I am aiming to attain one static value by creating a virtual table using SUMMARIZE function, then trying to get an average from that, using the following DAX.
Thanks in advance
Hi Anonymous - I have done slight modification on the above measure, can you please check
MD Team Average - Accel >2 m/s² =
VAR tbl_acc_2 =
SUMMARIZE (
FILTER (
ALL('GPS Match Data'), // Use ALL to ignore any slicers
NOT CONTAINSSTRING('GPS Match Data'[Session Type], "U21") &&
NOT 'GPS Match Data'[Name] IN { "Joe Bloggs", "Joe Bloggs1" } &&
'GPS Match Data'[Date] > DATE(2023, 7, 1)
),
'GPS Match Data'[Date],
'GPS Match Data'[Session Type],
"Value", ROUND(DIVIDE(SUM('GPS Match Data'[Accels (>2 m/s²)]), 10), 0)
)
VAR MD_acc_2 = AVERAGEX(tbl_acc_2, [Value])
RETURN
MD_acc_2Hope it works.
1 Reply
- rajendraongole1
Super User
Hi Anonymous - I have done slight modification on the above measure, can you please check
MD Team Average - Accel >2 m/s² =
VAR tbl_acc_2 =
SUMMARIZE (
FILTER (
ALL('GPS Match Data'), // Use ALL to ignore any slicers
NOT CONTAINSSTRING('GPS Match Data'[Session Type], "U21") &&
NOT 'GPS Match Data'[Name] IN { "Joe Bloggs", "Joe Bloggs1" } &&
'GPS Match Data'[Date] > DATE(2023, 7, 1)
),
'GPS Match Data'[Date],
'GPS Match Data'[Session Type],
"Value", ROUND(DIVIDE(SUM('GPS Match Data'[Accels (>2 m/s²)]), 10), 0)
)
VAR MD_acc_2 = AVERAGEX(tbl_acc_2, [Value])
RETURN
MD_acc_2Hope it works.