Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How do I convert number ranges into a text?
11-29-2023
06:47 PM
Hi,
How do I convert number ranges into a text? E.g.
- <1 = "Text1"
- > 0 but <11 = "Text2"
- > 10 but <21 = "Text3"
- >20 = "Text 4"
Thanks!
Solved! Go to Solution.
1 ACCEPTED SOLUTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023
07:58 PM

Thanks for all your suggestions! I finally used (a Youtube solution) Switch to compare the number against a range to yield a True/False, and then assigning a Text value depending on the Binary test.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023
07:58 PM

Thanks for all your suggestions! I finally used (a Youtube solution) Switch to compare the number against a range to yield a True/False, and then assigning a Text value depending on the Binary test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023
11:01 AM

Use a conditional column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023
08:50 PM

let
Source = #table(1,List.Zip({{0..25}})),
Custom1 = Table.AddColumn(Source,"Custom",each {"Text1","Text2","Text3","Text4"}{List.PositionOf({1,11,21},[Column1],1,(x,y)=>y>=x)+1})
in
Custom1

Helpful resources
Announcements
Power BI Monthly Update - July 2025
Check out the July 2025 Power BI update to learn about new features.

Recommendations
Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 08-11-2022 12:06 PM | ||
04-07-2016 11:23 AM | |||
Anonymous
| 02-18-2022 02:05 PM | ||
06-09-2025 07:47 AM | |||
05-27-2025 11:55 AM |