Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
925stuart
Helper I
Helper I

I'm wondering if there is a smarter way of doing what I'm doing.  Here is how I do it today.

Hi all!  I'm wondering if there is a smarter way of doing what I'm doing.  Here is how I do it today.

 

  1. I've a raw data of Born Date. 
  2. I then create a new column named Age where Age = Today() minus Born Date.
  3. I then create more columns like so,
    1. Is_Teen = Below 18 years old.
    2. Is_YoungAdult = ........
    3. So and and so forth.

 

I create the columns Is_Teen, Is_YoungAdult, etc... so that I can plot a column chart showing age spread.  Is there a simpler way to do this without creating all those columns like Is_Teen, Is_YoungAdult, etc?

 

Thanks!

1 ACCEPTED SOLUTION

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

You should not create multiple columns.  Just create a single column and in that, via an IF() function, generate th results as Teen, Young adult etc.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.