Forum Discussion
Hiding Tables in Desktop
I´d love to see an answer to this one please?
At the moment I´m working on a project with 2 x 20 text files (don´t ask!) that I then combine into 2 tables with "Append Query". In Power Query I can at least group the two groups of text files, but I´d love to make them invisible other than there, as they are just clutter e.g. in the relationship view.
Hi Anonymous,
Instead of making two different queries have you tried to have one single querie compose by differente sources and then combining them in the append?
In the advance view you can add source and keep them as queries and the final result is just one.
See the example below:
let
Source_1 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUUpUitWJVjICspLALGMgKxnMMgGyUsAsUyArVSk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
Format_1 = Table.TransformColumnTypes(Source_1,{{"Column1", Int64.Type}, {"Column2", type text}}),
Source_2 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlPSUUpMVIrViVYyBzKTksBMCyAzORnMtAQyU1LATEMDIDs1VSk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
Format_2 = Table.TransformColumnTypes(Source_2,{{"Column1", Int64.Type}, {"Column2", type text}}),
Append = Table.Combine({Format_1, Format_2})
in
AppendAs you can see in my end result I only have one table and the two inputs are "hidden" in the code so the end user only can see the final result.
- Anonymous9 years agoNot applicable
I appreciate the answer, I really do, but this is pushing the boundaries of my understanding of M. I´m only playing around with CSV files but it looks to me like the example is dealing with binary files.
I might give something like this a whirl one day, but the better strategy I think is to avoid having to work with dumps of text files and go directly to the source db.
Thanks - Ragnar
- MFelix9 years ago
Super User
Anonymous,
The example is with binary but we can do it with all PBI source datas, I just wanted to show that we can have I single query that combines several data sources and the end user will only see the final result.
If you want something based on the CSV I can set up a small example also.
regards,
Mfelix
- Anonymous9 years agoNot applicable
Mfelix,
I would be very glad if you did - thanks. And for extra bonus points, could you show how to pick out field names, change the field names, and set data types (e.g. specify text field, a date field etc)?
However I do worry that as I'm working with semicolons as the field delimiter, and the input files in a few cases have semicolons in them, I might run into trouble. At least when I used Power Query I could see by looking at the last column if the fields had shifted due to a semicolon in the text.
But I'd still love to learn and understand the method you're describing.
Thanks again, R.