Forum Discussion
displaying incorrect data
- 1 year ago
Hi TomSinAA
This is expected behavior. VertiPaq stores and indexes text in a normalized, case-insensitive way, so APPLE, apple, and Apple are treated as the same value, with only the first encountered version kept. While this improves compression and reduces model size, it also means you cannot store two values that differ only by letter casing. A possible workaround is to append an invisible character to the text, repeated according to a defined sort order, so that VertiPaq treats them as unique - you can create a rank column for that sort order (not available in the GUI).
M Code:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjYyM7JQ0lEyMTQzjXfKSMxV8EtVMIw3MDc2iPeND1eK1RmcaixR1bgOajWxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"#Route Id" = _t, #"Route No" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"#Route Id", Int64.Type}, {"Route No", type text}}), #"Added Route No Index" = Table.AddRankColumn( #"Changed Type", "Route No Index", {"Route No", Order.Ascending}, [RankKind = RankKind.Dense] ), #"Added Custom" = Table.AddColumn(#"Added Route No Index", "Route No2", each [Route No] & Text.Repeat(Character.FromNumber(8203), [Route No Index]), type text), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Route No"}), #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Route No2", "Route No"}}) in #"Renamed Columns"
Hello danextian
Here is my query:
let
Source = Access.Database(File.Contents("path to database is here"), [CreateNavigationProperties=true]),
_tbl_StaticRouteDetail = Source{[Schema="",Item="tbl_StaticRouteDetail"]}[Data],
#"Filtered Rows" = Table.SelectRows(_tbl_StaticRouteDetail, each [Active] = "-1")
in
#"Filtered Rows"
I am not sure how to modify it to incorporate your code. I tried a few things but was not successful