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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
kamalbandam
Helper III
Helper III

Continuous Percntages value conversion into a different range

 I have percentage from with a measure x  0 - 100. I want to make this break into different ranges and make it use a slicer so that I can slice in between the ranges i.e 1-10, 10-30, 40-70,70-100. But the percentages are in the form of measure x. I have written an if condition to create the ranges. Since It is an measure it won't allow in a slicer. So I need to make it as a column but the measure x can't be as column. How do I relate this measure x to a column

Anyone could you please help me with this.

 

Thanks in Advance,

Kamal

1 ACCEPTED SOLUTION

@kamalbandam 

 

Due to the privacy issues, I'm unable to download your pbix file.

 

Sample table

NameContribution
A10.00%
B30.00%
C50.00%
D70.00%
E20.00%

 

Range table

Range
0-20
21-40
40 above

 

Create a DAX measure.

 

Filter =
VAR _range =
    SELECTEDVALUE ( RangeTable[Range] )
VAR _per = ContributionTable[Contribution Sales %]
VAR _filter =
    IF (
        _range = "0-20",
        IF (
            _per > 0
                && _per < .21,
            "Required",
            "Not Required"
        ),
        IF (
            _range = "21-40",
            IF (
                _per > .20
                    && _per < .41,
                "Required",
                "Not Required"
            ),
            IF (
                _range = "40 above",
                IF (
                    _per > 40,
                    "Required",
                    "Not Required"
                )
            )
        )
    )
RETURN
    _filter

 

 

Apply this measure as a visual level filter. 

 

Capture.JPG

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

View solution in original post

6 REPLIES 6
nandukrishnavs
Community Champion
Community Champion

@kamalbandam  Please provide a sample data set, and measure logic. then expected output. 


Regards,
Nandu Krishna

Hi @nandukrishnavs 

 

Please download the pbix sample form https://filebin.net/hkxo3gmkp2ptci1x
Please change the extension to .pbix if it  downloads as Zip.
The ouput expected as follows:

Annotation 2020-05-06 114943.pngAnnotation 2020-05-06 115019.png

Thanks & Regards,

Kamal

@kamalbandam 

 

Due to the privacy issues, I'm unable to download your pbix file.

 

Sample table

NameContribution
A10.00%
B30.00%
C50.00%
D70.00%
E20.00%

 

Range table

Range
0-20
21-40
40 above

 

Create a DAX measure.

 

Filter =
VAR _range =
    SELECTEDVALUE ( RangeTable[Range] )
VAR _per = ContributionTable[Contribution Sales %]
VAR _filter =
    IF (
        _range = "0-20",
        IF (
            _per > 0
                && _per < .21,
            "Required",
            "Not Required"
        ),
        IF (
            _range = "21-40",
            IF (
                _per > .20
                    && _per < .41,
                "Required",
                "Not Required"
            ),
            IF (
                _range = "40 above",
                IF (
                    _per > 40,
                    "Required",
                    "Not Required"
                )
            )
        )
    )
RETURN
    _filter

 

 

Apply this measure as a visual level filter. 

 

Capture.JPG

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

Great Solution. It worked very well.

Thank you very much

nandukrishnavs
Community Champion
Community Champion

@kamalbandam 

 

You could try what-if parameter.

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

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Hi @nandukrishnavs ,

 

This didn't work.

 

Could you please tell me another solution if any.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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
Top Kudoed Authors