cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL dashboard report: Select table column dynamically

pawank9
New Contributor II

I am using SQL Dashboard report, there are around 400 columns in a table, I want to display some of the columns based on data, not all 400 columns should be displayed.

eg: a table have column named c1, c2,c3,c4 and rows r1, r2, r3, r4. The report should show columns as per the below scenario,

case 1: for row r1, the report should dynamically show c1 and c2.

case 2: for row r2, the report should dynamically show c3 and c4.

case 3: for row r3, the report should dynamically show c1 and c4.

Note: consider the report is showing only one row for now.

2 REPLIES 2

Hubert-Dudek
Esteemed Contributor III

You can build own logic using query parameters, and/or just select required columns based on case.

image.png

Hi, thanks for the response.

my requirement is to select columns dynamically not the query param.

I need to select columns based on data. hope the below example provides clarity:

eg: a table have column named c1, c2,c3,c4 and rows r1, r2, r3, r4. The report should show columns as per the below scenario,

case 1: for row r1, the report should dynamically show c1 and c2.

case 2: for row r2, the report should dynamically show c3 and c4.

case 3: for row r3, the report should dynamically show c1 and c4.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.