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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

how to use measure which is in percentage format in slicer

Hi All,

 

I have the data in below format and i need to provide user a slicer for selecting Rate  (last column in below table). This should be a Range slicer as shown below. But currently, slicer is not supporting a measure. Any alternative that i can use or achieve this?

 

LP280388_0-1599735975341.png

 

 

source_systemorderstatusFilled-Cosed countCount of OrdersTotal OrdersRate (Filled- Cosed count / Total Orders)
AmruthaCancelled 4595956405 
AmruthaFilled18203182035640532.27%
FrankClosed19745197451994199.02%
FrankHalted 1419941 
FrankSubmitted 21519941 
LS  335614472 
LSCancelled 1011914472 
LSClosed3636144720.25%
LSDeleted 314472 
LSFilled12856128561447288.83%
LSOpen 241014472 
LSPending 7914472 
LSScheduled 2914472 
LLCancelled 10317 
LLClosed939331729.34%
LLFilled21121131766.56%
LLOpen 2317 
LLPending Fill 1317 
SWFilled435707435707435707100.00%
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

I build a sample for you to solve this problem. (Rate column is a calculated column)

 

Rate = 'Table'[Filled-Cosed count]/'Table'[Total Orders]

 

1.png

Firstly build a Slicer, you can build a calculated Table directly or build a Whar if parameter like replies above.

 

Slicer = GENERATESERIES(0,1,0.0001)

 

Then build a measure to achieve your goal.

Here are two different measures for you.

 

Measure1 = 
VAR _Max =
    MAX ( Slicer[Percent] )
VAR _Min =
    MIN ( Slicer[Percent] )
VAR _Maxx =
    MAXX ( ALL ( slicer ), Slicer[Percent] )
RETURN
    IF (
        _Max = _Maxx,
        IF (
            AND ( SUM ( 'Table'[Rate] ) >= _Min, SUM ( 'Table'[Rate] ) <= 1 ),
            SUM ( 'Table'[Rate] ),
            BLANK ()
        ),
        IF (
            AND ( SUM ( 'Table'[Rate] ) >= _Min, SUM ( 'Table'[Rate] ) <= _Max ),
            SUM ( 'Table'[Rate] ),
            BLANK ()
        )
    )

 

 

 

Measure 2 = 
VAR _Max =
    MAX ( Slicer[Percent] )
VAR _Min =
    MIN ( Slicer[Percent] )
VAR _Maxx =
    MAXX ( ALL ( slicer ), Slicer[Percent] )
VAR _a =
    CALCULATE (
        SUM ( 'Table'[Rate] ),
        FILTER ( 'Table', 'Table'[Rate] >= _Min && 'Table'[Rate] <= 1 )
    )
VAR _b =
    CALCULATE (
        SUM ( 'Table'[Rate] ),
        FILTER ( 'Table', 'Table'[Rate] >= _Min && 'Table'[Rate] <= _Max )
    )
RETURN
    IF ( _Max = _Maxx, _a, _b )

 

Result is as below.

Default:

2.png

Use slicer:

3.png

You can download the pbix file from this link: how to use measure which is in percentage format in slicer

 

Best Regards,

Rico Zhou

 

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

13 REPLIES 13
Ashish_Mathur
Super User
Super User

Hi,

Instead of the allowing the user to select any value in the slicer visual, will you be OK with the slicer showing buckets i.e. 0%-10%, 11%-15% etc.  If yes, then share the link from where i can download your PBI file and also share the buckets that you would like to see in the slicer. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur  Thanks for the suggestion. but to my bad luck, the client requires it as a slicer.

Hi,

It will be a slicer.  It is just that your client will not be able to select 32.6% but instead will be able to select a bracket like 30% - 35%.  Will that be OK?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

@Ashish_Mathur  Thanks Ashish, 

 

That would be fine i guess.  I cant share the file here as i dont have the option.

 

Will you be able to create a file with test file and the slicer and share with some dummy data.

 

The columns that i have are

Source, OrderID, Orderstatus, Specialty, SubSpecialty, Bill,  Fill Rate

 

The bucket can of 5% increments.

Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

I build a sample for you to solve this problem. (Rate column is a calculated column)

 

Rate = 'Table'[Filled-Cosed count]/'Table'[Total Orders]

 

1.png

Firstly build a Slicer, you can build a calculated Table directly or build a Whar if parameter like replies above.

 

Slicer = GENERATESERIES(0,1,0.0001)

 

Then build a measure to achieve your goal.

Here are two different measures for you.

 

Measure1 = 
VAR _Max =
    MAX ( Slicer[Percent] )
VAR _Min =
    MIN ( Slicer[Percent] )
VAR _Maxx =
    MAXX ( ALL ( slicer ), Slicer[Percent] )
RETURN
    IF (
        _Max = _Maxx,
        IF (
            AND ( SUM ( 'Table'[Rate] ) >= _Min, SUM ( 'Table'[Rate] ) <= 1 ),
            SUM ( 'Table'[Rate] ),
            BLANK ()
        ),
        IF (
            AND ( SUM ( 'Table'[Rate] ) >= _Min, SUM ( 'Table'[Rate] ) <= _Max ),
            SUM ( 'Table'[Rate] ),
            BLANK ()
        )
    )

 

 

 

Measure 2 = 
VAR _Max =
    MAX ( Slicer[Percent] )
VAR _Min =
    MIN ( Slicer[Percent] )
VAR _Maxx =
    MAXX ( ALL ( slicer ), Slicer[Percent] )
VAR _a =
    CALCULATE (
        SUM ( 'Table'[Rate] ),
        FILTER ( 'Table', 'Table'[Rate] >= _Min && 'Table'[Rate] <= 1 )
    )
VAR _b =
    CALCULATE (
        SUM ( 'Table'[Rate] ),
        FILTER ( 'Table', 'Table'[Rate] >= _Min && 'Table'[Rate] <= _Max )
    )
RETURN
    IF ( _Max = _Maxx, _a, _b )

 

Result is as below.

Default:

2.png

Use slicer:

3.png

You can download the pbix file from this link: how to use measure which is in percentage format in slicer

 

Best Regards,

Rico Zhou

 

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

Hi,

Upload the file to Google Drive or similar service and share the download link.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@Anonymous - I believe you essentially need a Complex Selector - https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

 

So, create a What If Parameter with your %'s, then something like:

 

Selector Measure = 
  VAR __Min = MIN('Slicer'[Value])
  VAR __Max = MAX('Slicer'[Value])
RETURN
  IF([OrdersRate]>=__Min && [OrdersRate]<=__Max,1,0)

 

Assumes OrdersRate is a measure, otherwise assuming you would use it in your slicer. You then filter the visual where Selector Measure = 1. If you filter all your visuals this way then they should all be affected by the slicer.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  Hi Greg,

 

thanks for the response,

 

I'm having an error while creating this "selector Measure"

Error = Column 'Parameter Value' in table 'Parameter' cannot be found or may not be used in this expression

 

I can i resolve this?

 

Selector Measure =
VAR __Min = MIN('Parameter'[Parameter Value])
VAR __Max = MAX('Parameter'[Parameter Value])
RETURN
IF([fillrate]>=__Min && [fillrate]<=__Max,1,0)

@Anonymous I don't know. Is this a measure or a column formula. If it is a measure, do you have that column in that table?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  The parameter[value] is a measure auto created when a parameter is created with Whatif parameter functionality.

amitchandak
Super User
Super User

@Anonymous , you can use measure from slicer. You can create a slicer using what if or generate series and use that as filter 

 

To filer a measure you need force a row context in formula

 

Sumx(values(Table[Category]) ,if([Measure] <= selectedvalue(Parameter[parameter]), [Measure] , blank()))

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

Or you can create bucket using binning or segmentation

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Thanks Amit,

Would it be possible to explain me how can i have what if parameter with my data. I want this Rate slicer to filter all the visuals i have in one page in my powerbi file with multiple measures in each of them.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors