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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure greater/less than button

Hello,

I have a KPI calculated by different aggregation levels ( it can't be a calculated column).

region.PNG

 

 

 

The idea would be 2 buttons, one the >50 and the other one <50.

It works perfectly doing this, but i was wondering if its possible to replicate this same filter with dax ( I have tried many things) : 

Captura.PNG

 

Any ideas ? 

 

Thank you very much!!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a measure

 

Measure = IF([Kpi]>50,[Kpi])

 

 

Capture16.JPG

You could also create a what-if parameter, than click on the "down" arrow to select type of slicer.

Capture4.JPGCapture6.JPG

Then create a measure

Measure = var mins=MIN(Parameter[Parameter]) var maxs=MAX(Parameter[Parameter]) return IF([KPI]<=maxs&&[KPI]>=mins,[KPI])

Capture7.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a measure

 

Measure = IF([Kpi]>50,[Kpi])

 

 

Capture16.JPG

You could also create a what-if parameter, than click on the "down" arrow to select type of slicer.

Capture4.JPGCapture6.JPG

Then create a measure

Measure = var mins=MIN(Parameter[Parameter]) var maxs=MAX(Parameter[Parameter]) return IF([KPI]<=maxs&&[KPI]>=mins,[KPI])

Capture7.JPG

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

DataZoe
Employee
Employee

@Anonymous have you tried something like this

 

1. Create a table (enter data) with >=50 and <50 (KPIToggle and column called Toggle)

2. Create new measure

 

KPI Filter =
SWITCH (
    SELECTEDVALUE ( KPIToggle[Toggle] ),
    "<50", FILTER ( VALUES ( [RegionName] ), [KPI] < 50 ),
    ">=50", FILTER ( VALUES ( [RegionName] ), [KPI] >= 50 ),
    [KPI]
)

 

 3. use that measure in your table

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Anonymous
Not applicable

Thanks for answering,

I have tried that, but since [KPI] is not a column but a measure, that approach does not work. 😞 

@Anonymous usually when measures are checked inside the filter() it works ok for me. If you have sample data it would be easier to help.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors