Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Is there such a thing? I've looked through the msft library with no luck (also via "=#shared" in PQ)
I need a dynamic and automated way to generate this list to pass off as a parameter to another function.
Let me know if you have any suggestions.
Thanks!
Igor
Solved! Go to Solution.
Oustanding Maxim; pretty sure this will do!
I am wanting to create a query that will automatically scan through (any) model tables/queries, ID "date" / "datetime" fields, determine MIN and MAX values and then feed those as parameter inputs into a query function that generates a dimCalendar table (FNdimCalendar) automatically. Step one is to ID the tables which can then be passed off to something like Table.Schema function etc. You just paved the initial portion of the path.
Side questions:
1) your comment to "Beware of recursion" - can you please elaborate?
2) Are you aware of any command etc. that would allow the query grouping structure to be accessed as well? Below excerpts are those of a poor example (essentially testing model) - I am referring to "Sources" and "Other Queries".
Thank you again for the input!
Igor
1) That is precisely what I had in mind. I am not seeing why it should be tricky but let me dig into it and I am sure I will find something else to quiz you on 🙂
2) 10-4. As part of my research, I reached out to some Microsoft engineers via email. Should I actually get a reply, I will be sure to ask this questions as well and will let you know what they say.
Happy holidays!
Awesome question, and I think I have a solution to only keeping the tables. Essentially, a try statement that attempts to count the number of columns in a table (all tables will have at least 0). -1 is thrown in case of an error. Then just keep the rows with a value >-1
let Source = #sections, Section1 = Source[Section1], #"Converted to Table" = Record.ToTable(Section1), #"Add TableTest" = Table.AddColumn(#"Converted to Table", "TableTest", each try Table.ColumnCount([Value]) otherwise -1, Int64.Type), #"Filtered Rows" = Table.SelectRows(#"Add TableTest", each [TableTest] > -1) in #"Filtered Rows"
Never knew about "is". That's an awesome solution!
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |