Forum Discussion

ssarin's avatar
ssarin
Frequent Visitor
4 years ago
Solved

Power BI- All Function with Date Slicer

Hello all,

I have created a measure that calculates the count of cases. I have used the All function so it doesn't get affected by any Slicer selection on the page, which works absolutely fine. When I add a date slicer to the page, the measure doesn't work. All function fails and gives me a filtered result. Any idea why it breaks and or how can I fix it?

 

  • Hi ssarin ,

    What parameter in the ALL function do you use, a table or a column? If it's a column, replace it with the whole table.

    I create a sample to clerify:

    And two measures:

    Measure1 =
    CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table'[Category] ) )
    
    Measure2 =
    CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) )
    

    Now can see, Measure1 which using a column in the ALL function changed with the slicer, but Measure2 which using a table in the ALL function didn't change with the slicer.

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

     

  • Hi ssarin ,

    Is your problem solved? If so, would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!

     

    Best Regards,
    Community Support Team _ kalyj

4 Replies

  • ssarin , Assume you have a fact - Fact1 and it joined to two dimensions Dim1 and dim2. and in formula you use all on dim1, then dim 2 will still filter. You have to use all on fact or both dim

  • ssarin's avatar
    ssarin
    Frequent Visitor

    There's just one table with multiple columns. 

  • Hi ssarin ,

    What parameter in the ALL function do you use, a table or a column? If it's a column, replace it with the whole table.

    I create a sample to clerify:

    And two measures:

    Measure1 =
    CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table'[Category] ) )
    
    Measure2 =
    CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) )
    

    Now can see, Measure1 which using a column in the ALL function changed with the slicer, but Measure2 which using a table in the ALL function didn't change with the slicer.

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

     

  • Hi ssarin ,

    Is your problem solved? If so, would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!

     

    Best Regards,
    Community Support Team _ kalyj