May 07 2024 12:53 AM
Hi,
I am new to using Dataverse and power query.
I am currently use two excel files - one for material data source and other for partlist.
So far, no trouble, but with growing number of materials.
I want to change the excel data source to Dataverse.
Background:
Questions:
Thank you in an advance.
May 07 2024 01:23 PM
SolutionYou may filter on partlist
as
let
Result = Table.SelectRows(Source, each List.Contains( Partlist[ID], [ID] ))
in
Result
May 07 2024 05:50 PM
May 07 2024 11:52 PM
In Power Query editor you may open Advanced Editor to modify M-script code, or for the concrete step you may modify the code in formula bar of the PQ editor.
May 08 2024 06:22 PM - edited May 08 2024 06:23 PM
Thank you @Sergei Baklan ,
It is working as well :)
For the table name for Partlist, can it be dynamic?
As of right now, we are using the partlist excel file as teams template file that can be used by other users.
And table name tends to get messy.
May 09 2024 09:56 AM
It could be, but it depends on which logic do you use to select this or that partlist table.
As variant that name of the file/table could be defined in the cell of Excel file which we could read by Power Query and use as parameter. Lot of samples, e.g.
Building a Parameter Table for Power Query (excelguru.ca)
May 09 2024 11:54 PM
May 10 2024 04:21 AM
In general the only what other users shall do is to enter desired partlist table name into the cell. Or you may them give an option to select from the list.
The rest is done by Power Query. However, all depends on details of your business process.
May 12 2024 06:37 PM
Hi @Sergei Baklan,
If I may ask how to do two actions you have described?
User input the table name in cell.
User selecting the table name from a list.
To explain furthermore on the partlist file.
Again, thank you so much for your feedback.
May 13 2024 07:35 AM
In any case user need to know filepath for such file and table name for the partlist. The latest could be check after the table is created
In the main file we created two named cells as parameters, let name them filepath and partlist (case sensitive when used in Power Query)
What user shall to do is copy/paste actual partlist table name here.
To get the table we use query like
let
path = Excel.CurrentWorkbook(){[Name="filepath"]}[Content]{0}[Column1],
name = Excel.CurrentWorkbook(){[Name="partlist"]}[Content]{0}[Column1],
Source = Excel.Workbook(File.Contents(path), null, true),
partlist_Table = Source{[Item=name,Kind="Table"]}[Data]
in
partlist_Table
That's idea of the logic.
May 07 2024 01:23 PM
SolutionYou may filter on partlist
as
let
Result = Table.SelectRows(Source, each List.Contains( Partlist[ID], [ID] ))
in
Result