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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aakif_aslam
Helper I
Helper I

DAX - Range Slicer using Measure value

Hello to all,

My client has requested to create a Power BI report based on the Excel format. There is a requirement for Slicers to filter the report by the range of percentage (0 - 20%, 20-40%).

I know for a slicer, it is better to create a calculated column and use it in a Slicer. 

Since I've created a measure to calculate dynamic Percentage, is it possible to create a slicer with a defined percentage range?

I need to check the feasibility of this, is it achievable or it's a limitation in Power BI?

 

Please help.

 

 

@amitchandak 

@Sahir_Maharaj 

@tamerj1 

@Greg_Deckler 

@FreemanZ 

 

 

 

4 REPLIES 4
rahulmathur
New Member

we can create slicer based on any column values
adding a new column or measure  which have this percentage range as value and create slicer on that column values
tamerj1
Super User
Super User

Hi @aakif_aslam 

create a table that contains the range name, lower limit and upper limit 

then use the following measure instead 

Dynamic Percentage 2 =
SUMX (
CROSSJOIN ( 'PercentageRange', VALUES ( 'Table'[Attribute] ) ),
VAR DynamicPercentage = [Dynamic Percentage]
RETURN
INT ( DynamicPercentage >= 'PercentageRange'[Lower Limit]
&& DynamicPercentage < 'PercentageRange'[Upper Limit] )
)

Hi @tamerj1,

Thankyou for the response.

 

From your response what I understand is the table name that is created with total of 3 columns. 

Below is the error I received -

aakif_aslam_0-1679396865982.png

Am I missing something here?

@aakif_aslam 
Please refer to my original reply. I have highlighted the key sentences in bold font. 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.