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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
TBoyle
Regular Visitor

Assigning numerical value to school year and reg groups

Hi, I want to add a numerical value to year groups and registration groups. As it doesn't like nursery and reception labeling.

 

For example:

Year group column

00N = -1

00R = 0

1 =  1

etc

 

Reg group column

F3 = 7

L4 = 8

etc

 

Also is there a way to tell a column with blanks to show a certain word, for instance, I'd like my blank cells to display 'unknown'.

 

Thank you in advance for any help you may be able to give.

1 REPLY 1
ray_aramburo
Super User
Super User

Create a new column with DAX (or conditionally through Power Query). With DAX it will be something similar to:

Year group column = SWITCH( TRUE (), TableName[ColumnWithYourValues] = "00N", -1, TableName[ColumnWithYourValues] = "00R", 0, TableName[ColumnWithYourValues] = "1",TableName[ColumnWithYourValues]= BLANK(), "Unknown")

Just be careful that if you use the Unknown label, your numerical values (-1,0,1, etc.) must be string format.

Any additional condition you can write it in the Switch statement, the syntaxis would be Expression (Column Name evaluated against something), Result, ...)





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors