Forum Discussion

Erik_Debono's avatar
Erik_Debono
Advocate II
6 years ago
Solved

Dax Average with Distinct Filter

Hi All,   I'm trying to filter a table (have provided a mock one below) where I filter by Distinct and a result. As you can see, the Cycle time will be the same for every ID but I only want to Aver...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Erik_Debono -

    Try the following:

    Cycle Time Average = 
    var _table = DISTINCT(
        SELECTCOLUMNS(
            FILTER('Cycle Time', [Result]<>"N/A"), 
            "ID", [ID],
            "CycleTime", [CycleTime]
        )
    )
    return AVERAGEX(_table, [CycleTime])

     

    I hope this helps. If it does, please Mark as a solution.
    I also appreciate Kudos.
    Nathan Peterson