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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.