Forum Discussion

OCBB_SFAFPandA's avatar
OCBB_SFAFPandA
Icon for Resolver I rankResolver I
4 years ago
Solved

Creating a filter from measures

Hello,

 

I have 2 measures I am using (TY Sales, LY Sales). 

 

I created a measure (with help from this board) to summarize if TY sales or LY sales is 0 for the filtered time period, it returns a 1, otherwise 0.

 

IF(coalesce([TY Sales],0) = 0,1,if(coalesce([LY Sales],0) = 0,1,0))

 

How would I be able to get this in a slicer or the page level filter pane? Ideally I would rename the 0/1 to some text 

 

 

 

  • Hi, OCBB_SFAFPandA ;

    1. Calculation column/table not support dynamic changed based on filter or slicer.
    2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual by its row context.

    https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

     

    So you could not drag a measure into slicer, this will lead to an infinite loop.


    Until now, we can't add measure in Page level filter, please review this 
    feature request and vote it.

    It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

    • OCBB_SFAFPandA's avatar
      OCBB_SFAFPandA
      Icon for Resolver I rankResolver I

      The TY/LY sales are measures and PBI doesn't allow me to drag the condition measure to a slicer or filter pane. On the filter pane, I can only do it on a visual

       

       

      Some other solutions I saw were to include in condition formula in my table and make it "invisible" and filter that way. But I need the users to have the option with a slicer/page visual pane to either have the condition on or off. 

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

    Hi, OCBB_SFAFPandA ;

    1. Calculation column/table not support dynamic changed based on filter or slicer.
    2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual by its row context.

    https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

     

    So you could not drag a measure into slicer, this will lead to an infinite loop.


    Until now, we can't add measure in Page level filter, please review this 
    feature request and vote it.

    It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.