Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Measure ignore applied filter

hey expert i created a measure and dropped in table .From slicer i selected a specific region but still it shows data for all regions.
As in below image its showing for all regions..

I want following output with measure values related to them.

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Could be numerous things. You might have an ALL in your measure formula or there could be a missing relationship.

    • Anonymous's avatar
      Anonymous
      Not applicable

      yeah actually this measure is capturing date from a slicer which is using ALLSelected function

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler so is there any possibility actually i am fetching dates from slicer and then creating a measure..so  can i create a dynamic column or above mentioned measure which does work wth slicers.

      measure 1:Date Min =
      CALCULATE(
      MIN( DimDate[Date2] ),
      ALLSELECTED( DimDate[Date2] )
      )

      Measure 2:Date Max =
      CALCULATE(
      MAX( DimDate[Date2] ),
      ALLSELECTED( DimDate[Date2] )
      )
      Measure 3:
      Final Measure= IF([Latest Activity]>=[Date Min] && [Latest Activity]<=[Date Max],"active","inactive")

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        OK, that sounds more like a missing relationship or that somebody has inactivate interactions between visuals. Can you post an image of your data model? Is your region in the same table as your other data that you are displaying in the visual you are having issues with?

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    First of all, the filter will take effect when the related fields of different tables have created relationships, so you may need to create relationships between the related tables with "Both" of Cross filter direction. see more about relationship :Create and manage relationships in Power BI Desktop.

     

    Secondly, you may change your measure formula using ALLSELECTED function instead of ALL function.

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

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

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi  Anonymous  ,

     

    Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

     

    Best regards

    Amy