Forum Discussion

rgadbois's avatar
rgadbois
Frequent Visitor
3 years ago
Solved

Incorrect Avg

Hi,   I am attempting to calculate an measure for an average based on 2 criteria within separate columns. I want to filter by position, and by day code as seen below. I want to filter by position "...
  • tackytechtom's avatar
    3 years ago

    Hi rgadbois ,

     

    I used your measure as posted in your question. Note, I changed Position from "F" to "D" because "D" was the only value that you provided in your sample data:

     

     

    As you can see, I get the 340. Could it be that you just used the wrong letter? Otherwise, I think your DAX looks good 🙂 Here another way of writing it:

     

    _Forwards Game PL = 
    CALCULATE ( AVERAGE ( tabell[PL] ), tabell[Day Code] = "Game" && tabell[Position] = "D" )

     

     

    Hope this helps!

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/