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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic Column in DATATABLE function

Hi All

I want to create a Disconnected Table in order to perform a Switch function with.

 

BUT I want the columns and rows to populate from two DIM tables namely DIM_Product and DIM_Company.

 

Every row must contain the name of the either DIM_Product and DIM_Company in the first column and in the second column all the ProductNames and Companynames from the DIM_Product and DIM_Company tables instead of me manually typing them in every time there is an update to those table. thus it must be dynamic...

Is this possible?


@amitchandak 



I want Screenshot_1.png

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

As far as I know, it can't be achieved. However, you might try to use parameters in the query editor to get data from data source, unlike a dynamic table, which filters the data columns as soon as the data is loaded.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @V-lianl-msft 

 

Thank you for your response. 

I am not very familiar with the use of Parameters.

Any words you can share to guide me initially?

Hi @Anonymous ,

 

Please refer to this blog:

https://www.biinsight.com/power-bi-desktop-query-parameters-part2-dynamic-data-masking-and-query-parameters/ 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.