Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
Please I need help with changing age range in text to numbers on Power BI desktop.
The aage column has the following sample ranges:
Total - Age
15 to 24 years
25 to 29 years
I replacec the first "Total - Age" to "0-100" so I can convert the others to numbers. It gave errors. I replaced the "to" into "-".
I replaced "years" with " ". I then tried changing the data type to whole number. It still gave errors. How do I then chenge the column from text type to whole numbers?
Thank you.
What number do you want exactly? If it's just some number in the range, can you not just extract the first two characters of the field?
Thanks for your response. I want to have a range in numbers that I can use to plot graphs. This is a dataset I got about income and I just want to plot the incomes based on the age ranges.
15-24
25-34.....
Hi @Mariaoye ,
If your expected output is 15-24, 25-34, etc., then how is it going to be whole number? This will always be text datatype.
Also, you can also create groups based on the Age. Right click on age field and create new group.
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
@Anand24 Thanks. I guess I was looking at it all wrong.
I can only create categorical fields with range and not numeric. I want to believe that is what you meant.
Cheers.
@Mariaoye,
Yes, that's exactly what i meant. Your range can never be in whole number format.
Thanks for your response. I want to have a range in numbers that I can use to plot graphs. This is a dataset I got about income and I just want to plot the incomes based on the age ranges.
15-24
25-34....
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
47 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |