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
kavyapriya
Regular Visitor

How to show dynamic columns in table ?

so my query is i have one table with 4 columns but in future i will get few more columns so i need to show data in table if new columns  get add, i need to show new columns in table dynamically without manually add it into table.
 
for this we can do it with unpivot but i don't want to unpivot columns.

1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

Hi @kavyapriya ,
many connectors add new columns in the source automatically to the query in the query editor.
However, to my experience, this won't automatically be reflected in the data model with the next refresh.
Usually, you have to open the query editor, run the data preview there to see the new column, refresh the data and only then will new columns be added to the data model.

But there might be other experiences with it that I am not aware of.
 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

3 REPLIES 3
ImkeF
Super User
Super User

Hi @kavyapriya ,
many connectors add new columns in the source automatically to the query in the query editor.
However, to my experience, this won't automatically be reflected in the data model with the next refresh.
Usually, you have to open the query editor, run the data preview there to see the new column, refresh the data and only then will new columns be added to the data model.

But there might be other experiences with it that I am not aware of.
 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

kavyapriya
Regular Visitor

okay,
but if i have 2 tables one table is data and another table have data table column headers names so in this case is it possible to show dynamic columns without unpivot

 

Data Table:

kavyapriya_0-1670213500242.png

 

Column Header Table:

kavyapriya_1-1670213546428.png

 

ImkeF
Super User
Super User

Hi @kavyapriya ,
unpivot (other columns) is the way to go, as you cannot reference any of those "future" columns in the data model today anyway.

So what would be the benefit of loading additional columns that would not be used in the datamodel?

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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.