Forum Discussion

Chumtsoe_2024's avatar
Chumtsoe_2024
Frequent Visitor
2 years ago
Solved

Download fieldname

I would like to download only the column fieldnames.

 

How may I do so?

 

Thank you.

 

 

  • Hi Chumtsoe_2024 
    You can use a DAX QUERY View :

    Write query like :

    EVALUATE
        VAR _columns =
            SELECTCOLUMNS(
                INFO.COLUMNS(),
                "Column", [ExplicitName],
                "Desc", [Description],
                "DAX formula", [Expression],
                "TableID", [TableID]
            )
        VAR _tables =
            SELECTCOLUMNS(
                INFO.TABLES(),
                "TableID", [ID],
                "Table", [Name]
            )
        VAR _combined =
            NATURALLEFTOUTERJOIN(_columns, _tables)
        RETURN
            SELECTCOLUMNS(
                _combined,
                "Column", [Column],
                "Desc", [Desc],
                "DAX Formula", [DAX formula],
                "Home Table", [Table]
            )

    for more information please refer to the linked blog post:

    https://powerbi.microsoft.com/en-us/blog/dax-query-view-introduces-new-info-dax-functions/

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

     

2 Replies

  • Use DMVs. The new INFO.* functions have these, or use DAX Studio or SSMS.

  • Hi Chumtsoe_2024 
    You can use a DAX QUERY View :

    Write query like :

    EVALUATE
        VAR _columns =
            SELECTCOLUMNS(
                INFO.COLUMNS(),
                "Column", [ExplicitName],
                "Desc", [Description],
                "DAX formula", [Expression],
                "TableID", [TableID]
            )
        VAR _tables =
            SELECTCOLUMNS(
                INFO.TABLES(),
                "TableID", [ID],
                "Table", [Name]
            )
        VAR _combined =
            NATURALLEFTOUTERJOIN(_columns, _tables)
        RETURN
            SELECTCOLUMNS(
                _combined,
                "Column", [Column],
                "Desc", [Desc],
                "DAX Formula", [DAX formula],
                "Home Table", [Table]
            )

    for more information please refer to the linked blog post:

    https://powerbi.microsoft.com/en-us/blog/dax-query-view-introduces-new-info-dax-functions/

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