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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
trijoco
New Member

How to give variable values an alias?

Hi, I've been tasked with modifying an old Power BI report and was wondering if there's a way to give the values of a variable a different name, or alias, to make them easier to understand.

 

Specifically, we have a JobStatus column in a table (https://imgur.com/a/npA0MQO) and I'm wanting to either change the possible values of the variable, or give them an alias as per https://community.powerbi.com/t5/Desktop/Aliases-for-values-in-a-column/td-p/92182 eg 0 -> Incomplete, 10 -> Processing, 20 -> Complete

 

I realise that there's no way you could know what my Power BI report looks like and where the JobStatus variable is, but any general guidance on how I might access it would be greatly appreciated. The desktop environment is a bit confusing and there's no obvious way to change anything from the sidebar that comes up (https://imgur.com/a/HnaKuAT)

 

Thank you.

1 ACCEPTED SOLUTION


@trijoco wrote:

Hi d_gosbell, thanks for the reply! Unfortunately I'm totally new to Power BI so I just wanted to confirm your instructions:

 

1. Create JobStatuses table using the 'Enter Data' option in desktop app and follow that through

2. Follow instructions in https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships to create a many to 1 relationship (I'm guessing the JobStatuses table just gives an alternate, worded value to JobStatus that is switched to)

3. Replace instances of JobStatus with JobStatusDesc

 

Again, I really appreciate the help, this seems easier than expected.


Yes, that should be all you need to do.

View solution in original post

3 REPLIES 3
d_gosbell
Super User
Super User

This is actually pretty easy. The best way to do this is to create a separate table (maybe called JobStatuses)

 

eg.

 

JobStatusJobStatusDesc
0Incomplete
10Processing
20Complete

 

Then create a many to 1 relationship between your existing JobStatus column and the JobStatus column in this new table

 

ExistingTable[JobStatus]  *  ---> 1   JobStatuses[JobStatus]

 

Then I would suggest hidding the existing [JobStatus] column and replacing anywhere that you used it with the new  JobStatuses[JobStatusDesc] column.

Hi d_gosbell, thanks for the reply! Unfortunately I'm totally new to Power BI so I just wanted to confirm your instructions:

 

1. Create JobStatuses table using the 'Enter Data' option in desktop app and follow that through

2. Follow instructions in https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships to create a many to 1 relationship (I'm guessing the JobStatuses table just gives an alternate, worded value to JobStatus that is switched to)

3. Replace instances of JobStatus with JobStatusDesc

 

Again, I really appreciate the help, this seems easier than expected.


@trijoco wrote:

Hi d_gosbell, thanks for the reply! Unfortunately I'm totally new to Power BI so I just wanted to confirm your instructions:

 

1. Create JobStatuses table using the 'Enter Data' option in desktop app and follow that through

2. Follow instructions in https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships to create a many to 1 relationship (I'm guessing the JobStatuses table just gives an alternate, worded value to JobStatus that is switched to)

3. Replace instances of JobStatus with JobStatusDesc

 

Again, I really appreciate the help, this seems easier than expected.


Yes, that should be all you need to do.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.