Power BI dataset via email

Hello,

I have created flow to send an automated email with Power bi dataset attached, the problem I am facing is that dataset extract has table name as a prefix with every column name, the format appears like this on every column : table_name[col_name] also the order of the columns is not same as power bi table visual, please find the below code used for BI step. Appreciate your help on resolving this.

DEFINE
VAR __DS0Core =
SUMMARIZE(
‘proc_call’,
‘proc_call’[Index],
‘proc_call’[pack_id],
‘proc_call’[pack_number],
‘proc_call’[pack_number_shift_no]
)
EVALUATE
__DS0Core

ORDER BY
‘proc_call’[pack_id]

Hi - As you have not shared the sample PBIX file, I have tested on my sample data. For your purpose, you can use something like below.

 Evaluate SELECTCOLUMNS(Fruits,"Date",'Fruits'[Date],"Fruit",'Fruits'[Fruit],"Id",'Fruits'[ID])
 	ORDER BY
	[Date], [Fruit],[Id]

Order shall be same as the sequence you used in the SELECTCOLUMNS as shown below.

Thanks
Ankit J

1 Like