Forum Discussion

StephenGW's avatar
StephenGW
Icon for Helper II rankHelper II
5 years ago
Solved

Ignore Slicer in Measure

Hello,

 

I read a few similar threads but couldn't find one that would work with my measure. I made this measure using Quick Measure to find the most recent date where a column equals "Fail".

 

 

Fail Date =
MAXX(
    FILTER(Data,Data[Pass/Fail]="Fail"),
    CALCULATE(MIN('Data'[Audit Date]))
)+0
 
How can I make this ignore two slicers just for this measure. I have other data I want to react to the slicers in the same table but not this measure. I also have 2 other slicers I want to work with this measure. I need to ignore a slicer for 'Data'[Audit Month] and 'Data'[Audit year].
 
Is this possible?
 
Thanks,
StephenGW

11 Replies

  • Hi StephenGW !

     

    Please try using ALL() function to remove the filter cotext from [Audit Month] & [Audit Year] columns.

     

    Fail Date = CALCULATE(MIN('Data'[Audit Date]), FILTER(ALL(Data, Data[Audit Month], Data [Audit Year]), Data[Pass/Fail]="Fail"))

     

    Regards,

    Hasham

    • StephenGW's avatar
      StephenGW
      Icon for Helper II rankHelper II

      HashamNiaz 

       

      Thanks but that makes the visual not display. The details say "The rport measure 'Data'[Fail Date] has a syntax or semantic error at line 1, position 53, reported by Analysis Services: 'Multiple table arguments are not allowed in the ALL function. Here is a screenshot of my filters and the table.

       

      I want the Location and Department slicers to apply to the measure but not the year or month. Only thing in the table is 'Data'[Area] and the measure.

       

      Thanks for the quick reply.

       

      StephenGW

      • AlexisOlson's avatar
        AlexisOlson
        Icon for Super User rankSuper User

        ALL can take a table or columns but not both. Try removing the first argument in ALL:

         

        ALL ( Data[Audit Month], Data[Audit Year] )

         

  • m3tr01d's avatar
    m3tr01d
    Icon for Continued Contributor rankContinued Contributor

    You'll need to use either 

    ALL( Data[Audit Month], Data [Audit Year]), Data[Pass/Fail]="Fail")

    or

    ALL( Data[Audit Month], Data [Audit Year]), Data[Audit Date] )

     if you want to remove the filter on Month and Year slicer and also filter Audit_Date or Pass/Fail column

    • v-kelly-msft's avatar
      v-kelly-msft
      Icon for Community Support rankCommunity Support

      Hi  StephenGW ,

       

      Glad to know that your issue is solved now,could you pls mark the reply as answered to let more people find the solution.

       

      Best Regards,
      Kelly

      Did I answer your question? Mark my post as a solution!