Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Cris0410
New Member

Asking for Help: Adding Measure as Filter in Power BI

Hello!

 

I have a measure that calculates the performance of search terms in my campaigns. However, I want to add this as a filter, but I know that you cannot directly add a measure as a filter. Can anyone help me know how I can do this?

 

The formula for the measure is:

Bleeder: [Clicks] >= 10 and [Total Sales per Day] = 0

Untested: [Clicks] < 10, [Total Sales per Day] = 0

Unprofitable: ACOS > 0.25

Profitable**: ACOS between 0.15 and 0.25 < 0.25

Profitable: ACOS < 0.15

 

Thank you!

1 ACCEPTED SOLUTION
Wilson_
Super User
Super User

Hi Cris,

 

Hopefully you find this 11 minute youtube video helpful. 😄




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

Proud to be a Super User!





View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Cris0410 ,

I created some data:

vyangliumsft_0-1681192515180.png

 

Here are the steps you can follow:

1. Enter data – create a table.

vyangliumsft_1-1681192515182.png

2. Create measure.

Flag =
var _select=SELECTEDVALUE('Slicer_Table'[Group])
return
SWITCH(
    TRUE(),
    _select="Bleeder"&& MAX('Table'[Clicks])>=10&&MAX('Table'[Total Sales per Day])=0,1,
    _select="Untested"&&MAX('Table'[Clicks])<10&&MAX('Table'[Total Sales per Day])=0,1,
    _select="Unprofitable"&&MAX('Table'[ACOS])>0.25,1
    ,
    _select="Profitable**"&&MAX('Table'[ACOS])<=0.25&&MAX('Table'[ACOS])>=0.15,1,
    _select="Profitable"&&MAX('Table'[ACOS])<0.15,1,0)
Measure =
COUNTX(
    ALLSELECTED('Table'),[Index])

 3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1681192638142.png

4. Result:

vyangliumsft_3-1681192638144.png

 

Best Regards,

Liu Yang

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

Wilson_
Super User
Super User

Hi Cris,

 

Hopefully you find this 11 minute youtube video helpful. 😄




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

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.