Forum Discussion

prill22ta's avatar
prill22ta
Frequent Visitor
3 years ago
Solved

Using VALUES + ALL instead of just ALL. Resolution included - Need to know WHY it works

Hi there,  I recently ran into the following issue. My team has since resolved it (included) but we don't know 'why' it is the resolution. The ask: Calculate a Distinct Count of Values where th...
  • v-jialluo-msft's avatar
    3 years ago

    Hi prill22ta ,

     

    Using a single column argument, ALL returns all the unique values of the column.

    CALCULATETABLE (
        ALL(  table[field] ),
        table[field2] = "Yes"
    )

    So this statement returns the unique value of the table[filed] column, and the following table[filed2]="Yes" does not play a filtering role for the previous statement, because the ALL function ignores all filters

     

    ALL – DAX Guide

     

    Best Regards,

    Gallen Luo

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.