Forum Discussion

lilyyan's avatar
lilyyan
Frequent Visitor
9 years ago
Solved

What's the difference between ALL vs. ALLSELECTED, with formula filter as table vs. column

The original file Understanding Your Customers is downloaded from http://enterprisedna.co/power-bi-resources.   When calculating the total sales with different filters ALL and ALLSELECTED, with for...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi lilyyan,

     

    I think I found the reason, please take a look at below  test steps.

     

    Measure used to display the current row count.

    All(Table)/All(Column)/AllSelected(Table)/Allselected(Column) = COUNTROWS(ALL(Dates))&"-"&COUNTROWS(ALL(Dates[Date]))&"-"&COUNTROWS(ALLSELECTED(Dates))&"-"&COUNTROWS(ALLSELECTED(Dates[Date]))

     

     

    1. Calculate the real count by year filter and quarter filter.

     

    Result: allselected table work, allselected column not work.

     

    2. Test with date slicer.

     

    Result: allselected(table) and allselected(column) works.

     

    3. Test with date slicer and line chart.

     

    In summary, when you use allselected function, you should remember allselected(table) can works on all of its columns, but allselected(column) only works on the slicer with specify column as the source.

     

    Regards,

    Xiaoxin Sheng