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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
gittelena
Microsoft Employee
Microsoft Employee

Replacing default values

Hi there,

 

I am getting my data set via a API URL and need to change some default value codes (e.g. 0=Active, 1=Resolved, 3=Cancelled etc.)

 

I can think of 3 ways to do this:  

1: Replace the values in column via Transform/Replace Values 

2: Create a group

3: Add a condotional column

 

What is the best way? 

 

Thanks!

Gitte-Lena

 

1 ACCEPTED SOLUTION
edhans
Community Champion
Community Champion

For 3 values, a conditional column (basically nested IFs) will work great.

If it is more than that, you might want to create a reference table then merge that with your imported table, sort of like getting the item description from an Item DIM table to add the description to your FACT table where only the item number exists. You can do that hundreds/thousands/more rows were a conditional column would be impractical.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Community Champion
Community Champion

For 3 values, a conditional column (basically nested IFs) will work great.

If it is more than that, you might want to create a reference table then merge that with your imported table, sort of like getting the item description from an Item DIM table to add the description to your FACT table where only the item number exists. You can do that hundreds/thousands/more rows were a conditional column would be impractical.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.