Forum Discussion

ERing's avatar
ERing
Icon for Post Partisan rankPost Partisan
2 years ago
Solved

How can I modify this DAX query to alias the column headers?

I received a request to have a daily email scheduled to send users a CSV export of a table visual in one of my reports. I followed some online guideance to set up a flow using Power Automate and the ...
  • danextian's avatar
    2 years ago

    Hi ERing ,

     

    Your question is actually more of Power Automate than Power BI. When you run a query against a Power BI Dataset in Power Automate, the result always includes the table name and the column. To change the name,  you must add another action called Select which you can use to a custom column name onto the table/column/measure. Enter the desired column name in the first column and in the second, write an expression similar to below:

     

    Carpark is the Table while Carpark Number is the column. If referencing a measure, you can write something like @item()?['[Volume]'] where Volume is the name of the measure.

     

    You then need to add another action called Create CSV table where the input is the output from the previous step.  The output of this action is what you send to the recepients. For more information, I would suggest you visited the Power Apps forum.