Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
let
Source = TM1_Static_Budget_FY2024,
#"Detected Type Mismatches" = let
tableWithOnlyPrimitiveTypes = Table.SelectColumns(Source, Table.ColumnsOfType(Source, {type nullable number, type nullable text, type nullable logical, type nullable date, type nullable datetime, type nullable datetimezone, type nullable time, type nullable duration})),
recordTypeFields = Type.RecordFields(Type.TableRow(Value.Type(tableWithOnlyPrimitiveTypes))),
fieldNames = Record.FieldNames(recordTypeFields),
fieldTypes = List.Transform(Record.ToList(recordTypeFields), each [Type]),
pairs = List.Transform(List.Positions(fieldNames), (i) => {fieldNames{i}, (v) => if v = null or Value.Is(v, fieldTypes{i}) then v else error [Message = "The type of the value does not match the type of the column.", Detail = v], fieldTypes{i}})
in
Table.TransformColumns(Source, pairs),
#"Added Index" = Table.AddIndexColumn(#"Detected Type Mismatches", "Row Number" ,1),
#"Kept Errors" = Table.SelectRowsWithErrors(#"Added Index", {"AssetID", "Country", "Region/Segment", "Location", "Project", "Asset Type", "Asset Description", "MonthOfYear", "TotalBudget", "MonthInNumbers", "Month/Quarter", "MonthDate"}),
#"Reordered Columns" = Table.ReorderColumns(#"Kept Errors", {"Row Number", "AssetID", "Country", "Region/Segment", "Location", "Project", "Asset Type", "Asset Description", "MonthOfYear", "TotalBudget", "MonthInNumbers", "Month/Quarter", "MonthDate"})
in
#"Reordered Columns"
What is your question?
Check out the July 2025 Power BI update to learn about new features.