Forum Discussion

PriyaJha's avatar
PriyaJha
Helper I
5 years ago
Solved

DAX for average with multiple criteria

I have 4 columns in table called Month, Object, status, value. I want the MEASURE average of value only for specific status and for specific year so how i can write the average DAX with multiple criteria.

In excel i can easily write as averageifs(value, Month=Jan, status="Sold").

I WANT THE MEASURE ONLY.

Please suggest. i tried every and did not get success to add multiple criteria's.

  • Hey,
    You can use the below command for the output:

    average_ =
    CALCULATE(
    AVERAGE(your_table_name[value]),
    FILTER(
    ALL(your_table_name),
    your_table_name[month] = Jan
    && your_table_name[status] = "sold"
    )
    )

1 Reply

  • Hey,
    You can use the below command for the output:

    average_ =
    CALCULATE(
    AVERAGE(your_table_name[value]),
    FILTER(
    ALL(your_table_name),
    your_table_name[month] = Jan
    && your_table_name[status] = "sold"
    )
    )