The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I would like to ask how to resolve this issue. I have main table with date column DID_DAT and second table where date present in column headers like this:
Date filter is now implement by Date table.
How make that I will able to select data according to second table?
I tried to merge but got many duplicates.
Solved! Go to Solution.
Hi @Analitika ,
You could unpivot the columns with date name headers to get a date column.
For example, you can select the ID column and then click 'Unpivot Other Columns'.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIEYmMgNlWK1YlWcgKyjIDYBIjNlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"2022-8-7" = _t, #"2022-8-8" = _t, #"2022-8-9" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"2022-8-7", Int64.Type}, {"2022-8-8", Int64.Type}, {"2022-8-9", Int64.Type}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ID"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika ,
You could unpivot the columns with date name headers to get a date column.
For example, you can select the ID column and then click 'Unpivot Other Columns'.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIEYmMgNlWK1YlWcgKyjIDYBIjNlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"2022-8-7" = _t, #"2022-8-8" = _t, #"2022-8-9" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"2022-8-7", Int64.Type}, {"2022-8-8", Int64.Type}, {"2022-8-9", Int64.Type}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ID"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.