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
KarlinOz
Advocate III
Advocate III

convert conditional column to custom column

I searched the forum but didn't find anyone with my problem. 

In Query Editor:

I created a new custom column.

Later i needed to make a change to it and went back to edit it (clicking on the gear wheel icon in the Query Settings) but Power BI has converted it to a Conditional Column and I have lost access to doing a more complex query by using code. Is there a way to edit the code behind the Conditional Columns? Or is there a way to convert a Conditional Column to a Custom Column?

4 REPLIES 4
ankitpatira
Community Champion
Community Champion

@KarlinOz Selecting your query and clicking Advanced Editor under Home tab will give you access to code behind.

 

Capture.PNG

Thanks for that suggestion  @ankitpatira I found that and it is useful. It would be even better if we could isolate it to just the code for that column as in the Custom Column editor with which I created the column in the first place. In the Advanced Editor we have the code for the whole query.

@KarlinOz In that case use Enter Data option under Home tab which will let you create seperate table / query and so Advanced Editor code for that will be isolated from your original query.

Hmnmm I'm not sure that is what I am looking for @ankitpatira, that will create a new query wont it? What I am looking for is to edit an existing column in an existing query and change it back from a Conditional Column (automatically changed by Power BI) to a Custom Column which is how I originally created it.

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.