I'm trying to figure out how to get average value per day where type is for example of type "Test". This would show the average value for all rows which have the type as "Test" and the average of that same day. So all days would probably get different average values. How would this be done in Dax syntax? Below is a combination of SQL and normal text which might help explain what I'm trying to achieve.
select average Values per day from mytable where type = test
I'm providing an example table that might make it easier to understand, it's a quite simple question but I fail to find information on how to solve it, any help or input is highly appreciated, thanks!
You can filter the dataset to calculate the test value average.
AverageTestValues =
CALCULATE ( AVERAGE ( myTable[Values] ), FILTER ( myTable, [Type] = "Test" ) )
This expression calculates the test values average in a given context. If you use the measure in a total context you will get the average of all rows type Test
.
Let me know if this helps.