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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
monojchakrab
Resolver III
Resolver III

new query using column structure and calculated columns from existing query

I have a just cleaned out a lot of data in the BI query editor and added a few mesures and calculated columns.

 

But now I have got a similar set of data with new additional rows and I dont know how to use the existing query structure and its column structure/names (incl. the calculated columns) on the new query. The new table has slightly different column names, so I cannot append the same to the existing one.

 

I have tried to convert the steps used to clean up and structure the first query into a function - but when I invoke the function on the new table, it throws error.

 

I can share the files, if required.

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @monojchakrab 

 

Your requirements are difficult to achieve, obviously powerbi does not yet have the ability to copy data structures and dax structures if the column names are different.

 

If you can share the sample file, I can check it for you. 

 

Best Regards,
Community Support Team _ Janey

 

 

Hi @v-janeyg-msft ,

 

Thanks for the reply - is there an email address where I can ping over the data to you and take it from there?

Hi, @monojchakrab 

 

I can only answer your questions below the post. Your needs are definitely not complete at one time, I can only give some suggestions to facilitate your operation.

If possible, you need to show your samples and desired results as much as possible and let me judge.

You can show it by taking screenshots and adding table format:

vjaneygmsft_0-1649404640593.pngvjaneygmsft_1-1649404647776.pngvjaneygmsft_2-1649404661048.png

Best Regards,
Community Support Team _ Janey

jdbuchanan71
Super User
Super User

If you rename the new columns to match the existing ones you should be able to insert and append step into your existing query and set the new data source to not load to the data model.

Thanks jdbuchanan71. 

My problem is each new data source is coming with new columns and with different column names.

I am looking for a solution which automatically keeps only the columns as per the existing query template so that I dont have to do this manually every time I am loading new data, not do I have to concern with whether the new files have existing column structures and names or not.

Not sure if I have been able to communicate what I need help with 

I am starting out with DAX and hence apologies for pressing on...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.