cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OCBB_SFAFPandA
Resolver I
Resolver I

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 

OCBB_SFAFPandA_0-1656090209315.png

 

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community 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.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community 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.

ribisht17
Super User
Super User

ribisht17_3-1656092353479.png

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

ribisht17
Super User
Super User

@OCBB_SFAFPandA 

 

This can be done, what is the problem?

 

 

 

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

 

OCBB_SFAFPandA_0-1656098895513.png

 

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. 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors