Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
Solved! Go to Solution.
Due to the privacy issues, I'm unable to download your pbix file.
Sample table
Name | Contribution |
A | 10.00% |
B | 30.00% |
C | 50.00% |
D | 70.00% |
E | 20.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.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
@kamalbandam Please provide a sample data set, and measure logic. then expected output.
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:
Thanks & Regards,
Kamal
Due to the privacy issues, I'm unable to download your pbix file.
Sample table
Name | Contribution |
A | 10.00% |
B | 30.00% |
C | 50.00% |
D | 70.00% |
E | 20.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.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Great Solution. It worked very well.
Thank you very much
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 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |