Hi all,
I have DAX query created by Power BI, and I have flow which creates html tabel to my email. This works fine but I would like to format the results a bit. How can I format date and headers? Now dates are in format 2024-04-29T05:44:08 and headers "IsGrandTotalRowTotal". I would like date to be dd/mm/yyyy and header for example "Grand Total"?
--DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('Dates'[Date])),
'Dates'[Date] >= (DATE(2022, 12, 31) + TIME(0, 0, 1))
)
VAR __DS0FilterTable2 =
TREATAS({3}, 'Item Ledger Entry '[Entry Type])
VAR __DS0FilterTable3 =
TREATAS({"Today"}, 'Dates'[Slicer Date])
VAR __DS0FilterTable4 =
TREATAS({"PPP"}, 'Purch Rec Lines'[Location Code])
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL(
ROLLUPGROUP('Dates'[Date], 'Items'[No], 'Items'[Description]), "IsGrandTotalRowTotal"
),
__DS0FilterTable,
__DS0FilterTable2,
__DS0FilterTable3,
__DS0FilterTable4,
"SumQuantity", CALCULATE(SUM('Purch Rec Lines'[Quantity])),
"Item_Ledger_Entry_Quantity", CALCULATE(SUM('Item Ledger Entry '[Quantity])),
"Quantity_plus_Quantity2", 'Dates'[Quantity plus Quantity2],
"New_Item", 'Dates'[New Item]
)
VAR __DS0PrimaryWindowed =
TOPN(
502,
__DS0Core,
[IsGrandTotalRowTotal],
0,
'Dates'[Date],
1,
'Items'[No],
1,
'Items'[Description],
1
)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC, 'Dates'[Date], 'Items'[No], 'Items'[Description]--
BR
Matt