Forum Discussion

IlMoro's avatar
IlMoro
Helper II
4 years ago

Simple filtered table creation creates data mismatch

Hi,

I have two table, AAA and BBB. BBB is a filtered table of AAA created through this code: = FILTER(AAA,AAA[Assignment group]="MINE" || AAA[Ownership group]="MINE")

 

I expect that all data in all columns, thoese that are not filtered, will be transfered "as is" however it is not so for data and time columns that are not copied correctly. All other columns are transfered correctly.

 

Table AAA

 

Table BBB

 

Thanks for any help.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi IlMoro ,

    I can't upload pbix files for special reasons.

    Please refer to my codes.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtQHQiUdJSDy9fRzVYrVgQsbwcSAskjCxhDVyEIm2FWawlTGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"create time" = _t, #"Assignment group" = _t, #"Ownership group" = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"create time", type date}, {"Assignment group", type text}, {"Ownership group", type text}})
    in
        #"Changed Type"

     

    Then create a table.

    BBB = CALCULATETABLE(FILTER(AAA,AAA[Assignment group]="MINE"||AAA[Ownership group]="MINE"))

     

    If I have misunderstood your meaning, please provide more details with your desired output.

     

    Best Regards

    Community Support Team _ Polly

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • IlMoro's avatar
      IlMoro
      Helper II

      Hi Anonymous,

      the problem is that the date is transformed from AAA to BBB, for instance from "2022/08/10" to "2022/08/10 12:00:00AM" and time is not transferred at all in fact in BBB the columns time are empty.

      How can I copy all column keeping formats and data unchanged?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi IlMoro ,

        Could you please provide your sample pbix file without privacy information and desired output?

         

        Best Regards

        Community Support Team _ Polly

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.