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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Wienforth
Frequent Visitor

Switch connection to a different Power BI Service Dataset without breaking calculated columns

Hi everyone,

 

I've been scratching my head over this the last couple of days.

Whenever I switch the connection every calculated column remains in the table i originally created it in, keeping the name of the table but without any other fields. Both datasets in question have the same table / data structure / data type.

The new connection simply creates a table with a 2 appendix with all the fiels except the calculated column.

 

Here's an example:

I created a very basic calculated column as an example 

Wienforth_1-1695310146521.png

 

Located in this table

Wienforth_2-1695310182930.png

 

When I switch the connection to a different dataset, the structure looks like the following, the new connection created a new table:

Wienforth_3-1695310472506.png

 

 

I'm quite sure it has something to do with how Power BI handles calculated columns being attached to tables directly so it might not be possible but i didn't loose hope yet :D. I tried changing a couple of this with tabular editor but the only thing I could thing of was to recreate all calculated columns and measures to restore the functionality.

 

Here are my questions:

  • It is possible to switch a direct query connection to a Power BI Dataset to a different dataset without breaking calculated columns and measures that depend on said column?
  • If not, do you know the least painful way of transfering calculated columns and dependent measures to the new table?

 

Best regards and have a nice day!

Timo

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Wienforth Well, with DAX Editor Pro (Enterprise DNA) you can select your columns, switch the Table and click Save to transfer the calculated column to another table. I really should release a free version of that tool...or maybe add that functionality to Metadata Mechanic.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler

 

that would be more than fantastic! 😄 Do you know of any other sort of pain free way to transfer columns? 

 

Best regards and thanks as always for your replies!

Timo

@Wienforth I would think that Tabular Editor could do it if you wrote the C# code. I'll have to dig up my code for moving calculated columns and measures. There may be other third-party tools out there, I'd have to look around and see what's out there. With measures you can just change the Home table, but there's nothing native that I know with for calculated columns.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.