This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi! I need your help.
I'm trying to create a category measure, where the column I'm referencing has numers from 0 to 1. I'm trying to create a category every 25% like ranges. I cant't manually group thems because I have hundreds of thounsends differents values. Thanks Chat GPT and youtube I have these tow approaches, but no one have resolved my issue, thanks in advance for the help!
Approach 1:
Solved! Go to Solution.
Hi, if the measure is needed, please check the below picture and the attached pbix file.
Category % measure =
IF (
HASONEVALUE ( data[id] ),
SWITCH (
TRUE (),
SUM ( data[value] ) = 0, "0%",
SUM ( data[value] ) <= 0.25, ">0 -25%",
SUM ( data[value] ) <= 0.5, ">25 -50%",
SUM ( data[value] ) <= 0.75, ">50 -75%",
SUM ( data[value] ) <= 1, ">75-100%"
)
)
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
SWITCH function (DAX) - DAX | Microsoft Learn
Category % CC =
SWITCH (
TRUE (),
data[value] = 0, "0%",
data[value] <= 0.25, ">0 -25%",
data[value] <= 0.5, ">25 -50%",
data[value] <= 0.75, ">50 -75%",
data[value] <= 1, ">75-100%"
)
It's a great aproximation of how my data looks like, something a I forgot to write, is that I'm working in Direct Query mode, where the creating custom column function is a litle restricted.
Hi, if the measure is needed, please check the below picture and the attached pbix file.
Category % measure =
IF (
HASONEVALUE ( data[id] ),
SWITCH (
TRUE (),
SUM ( data[value] ) = 0, "0%",
SUM ( data[value] ) <= 0.25, ">0 -25%",
SUM ( data[value] ) <= 0.5, ">25 -50%",
SUM ( data[value] ) <= 0.75, ">50 -75%",
SUM ( data[value] ) <= 1, ">75-100%"
)
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 36 | |
| 30 | |
| 22 | |
| 22 |