Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Slicer not working with Measure

I am currenty working on a dashboard  where I want to use a slicer to show differing rowcounts of various tables depending on the date selected. I havean accounting table with a  row_count measure which shows the total row count regardless of the date period selected by the slicer.  The measure has the following formula:

 

 

I have a date table which which has a 1 to many relationship to the accounting table. Other measure which i have on the canvas are respondoing to the slicer as shown below.

 

  

 

I am not sure where I could be going wrong. any ideas. Thanks in Advance

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    I've noticed that your measure uses the ALL function, which ignores all filters, including slicers.

    If you want to ignore filters that are unexpected in addition to the slicer, use ALLSELECTED function .

    The ALLSELECTED function gets the context that represents all rows and columns in the query, while keeping explicit filters and contexts other than row and column filters.

    ALL function (DAX) - DAX | Microsoft Learn

    ALLSELECTED function (DAX) - DAX | Microsoft Learn

     

    Best Regards,

    Stephen Tao

     

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

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I've noticed that your measure uses the ALL function, which ignores all filters, including slicers.

    If you want to ignore filters that are unexpected in addition to the slicer, use ALLSELECTED function .

    The ALLSELECTED function gets the context that represents all rows and columns in the query, while keeping explicit filters and contexts other than row and column filters.

    ALL function (DAX) - DAX | Microsoft Learn

    ALLSELECTED function (DAX) - DAX | Microsoft Learn

     

    Best Regards,

    Stephen Tao

     

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

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous  That did the trick. thank you

  • Sourav_M's avatar
    Sourav_M
    Frequent Visitor

    Hi Anonymous,

    Not sure which measure you are referring here, which is not impacted by the date slicer. Is it the "Accounting Row Count" measure?

     

    Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    hi Sourav_M , my apoligies. it is indeed the Accounting Row Count