Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All,
I have two columns, one with fixed numbers between 0-100 [rating] and another new column [RatingGroup] where I want the values to be based on a group of the fixed numbers (e.g. 0 for 0-10, 1 for 10-20 etc.)
I've been trying to break it down to something simple first like this but it's not working:
RatingGroup = If(table[Rating] = "0-10", THEN table[RatingGroup] = "0")
Really appreciate some help!
Thanks!
Solved! Go to Solution.
RatingGroup =
SWITCH (
TRUE (),
Table[Rating] >= 0 && Table[Rating] <= 10, "0",
Table[Rating] > 10 && Table[Rating] <= 20, "1",
Table[Rating] > 20 && Table[Rating] <= 30, "2",
Table[Rating] > 30 && Table[Rating] <= 40, "3",
Table[Rating] > 40 && Table[Rating] <= 50, "4",
Table[Rating] > 50 && Table[Rating] <= 60, "5",
Table[Rating] > 60 && Table[Rating] <= 70, "6",
Table[Rating] > 70 && Table[Rating] <= 80, "7",
Table[Rating] > 80 && Table[Rating] <= 90, "8",
"9"
)This should work ![]()
RatingGroup =
SWITCH (
TRUE (),
Table[Rating] >= 0 && Table[Rating] <= 10, "0",
Table[Rating] > 10 && Table[Rating] <= 20, "1",
Table[Rating] > 20 && Table[Rating] <= 30, "2",
Table[Rating] > 30 && Table[Rating] <= 40, "3",
Table[Rating] > 40 && Table[Rating] <= 50, "4",
Table[Rating] > 50 && Table[Rating] <= 60, "5",
Table[Rating] > 60 && Table[Rating] <= 70, "6",
Table[Rating] > 70 && Table[Rating] <= 80, "7",
Table[Rating] > 80 && Table[Rating] <= 90, "8",
"9"
)This should work ![]()
You are a life savior thank you!
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 70 | |
| 55 | |
| 38 | |
| 28 | |
| 22 |
| User | Count |
|---|---|
| 133 | |
| 119 | |
| 54 | |
| 37 | |
| 31 |