Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear community,
I'm trying to set up a direct query connection to our SAP HANA db and this seems to be working. However I have one column that should be a date table. But when i'm changing the data type power query says this is not support and that i should switch to import mode. How can I use Direct Query and use a date column
let
Source = SapHana.Database("saphanadxxxxx.xxxxx:xxxxxx"),
Contents = Source{[Name="Contents"]}[Data],
xxxxxxxx = Contents{[Name="xxxxxxxxx"]}[Data],
Z_PPL1 = xxxxxx{[Name="Z_PPL"]}[Data],
#"Added Items" = Cube.Transform(Z_PPL1,
{
{Cube.AddAndExpandDimensionColumn, "ASMNAME", {"ASMNAME"}, {"ASMNAME"}},
{Cube.AddAndExpandDimensionColumn, "AUART", {"AUART"}, {"AUART"}},
{Cube.AddAndExpandDimensionColumn, "AUDAT", {"AUDAT"}, {"AUDAT"}},
{Cube.AddAndExpandDimensionColumn, "BEZEI", {"BEZEI"}, {"BEZEI"}},
{Cube.AddAndExpandDimensionColumn, "BFP", {"BFP"}, {"BFP"}},
{Cube.AddAndExpandDimensionColumn, "BSTKD", {"BSTKD"}, {"BSTKD"}},
{Cube.AddAndExpandDimensionColumn, "CRTD", {"CRTD"}, {"CRTD"}},
{Cube.AddAndExpandDimensionColumn, "DEL_DATE", {"DEL_DATE"}, {"DEL_DATE"}},
{Cube.AddMeasureColumn, "NETWRINEUR", "NETWRINEUR"}
}),
#"Removed Columns" = Table.RemoveColumns(#"Added Items",{"AUDAT"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"BEZEI", "test"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"DEL_DATE", Int64.Type}, {"DF", type date}})
in
#"Changed Type"
As far as I know, this is a known limitation.
Column and measure details are fixed: The list of columns and measures seen in the field list are fixed by the underlying source, and cannot be modified. For example, it's not possible to delete a column, nor change its datatype (it can, however, be renamed.)
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |