Forum Discussion

Priyamxylem's avatar
Priyamxylem
Icon for Helper I rankHelper I
1 year ago
Solved

Table Visual drop complete fields columns from a query

I have a SQL query which return more than 100 columns, I want to create a table visual and in values how can I drag and drop complete query so that I don't have to select each column one by one as it...
  • Ritaf1983's avatar
    Ritaf1983
    1 year ago

    Hi Priyamxylem 

    nfortunately, if column names need to change on refresh, there isn’t a way to dynamically select all columns for visualization—it has to be done manually, one by one.

    Alternative approaches:

    Use generic column names
    Instead of bringing in dynamic column names, you can assign generic names like "Column 1", "Column 2", so the structure remains consistent. This avoids the issue of columns disappearing or changing unexpectedly in visuals.

    Unpivot the data & use a matrix visual
    If your dataset structure allows it, consider using Power Query to unpivot the columns. This will transform column names into row values, making them filterable and dynamic.

    After unpivoting, the dataset will have three key fields:
    "Column Name" (previous column headers)
    "Category" (if applicable)
    "Value" (the actual data)
    You can then use a matrix visual, where:
    The "Column Name" field is placed in the columns section.
    The "Category" field is placed in the rows (if needed).
    Unpivot from PQ :

    Result:

    Using matrix :

    Note , it will help only if the data is a same data type...
    The pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly