Forum Discussion
Needing some help with how to build this table. Custom Columns.
- 1 year ago
This something like this what you are looking for?
let defaultPID = "25416", Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwVNJRCk4tKcnMSwcxI5ViddCEjbALGwOZfpjCJkiqTVHN9sMUNsIubIzdEBO4aiNTE0MzbC5HkzDCpcMYlw6oHbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PID = _t, Name = _t, Enabled = _t]), set_types = Table.TransformColumnTypes( Source, { {"PID", Int64.Type}, {"Name", type text}, {"Enabled", type text} } ), defaultTable = Table.SelectRows(Source, each [PID] = defaultPID), merge_tables = Table.NestedJoin( Source, {"Name"}, defaultTable, {"Name"}, "Source", JoinKind.LeftOuter ), expand_default_enabled = Table.ExpandTableColumn( merge_tables, "Source", {"Enabled"}, {"DefaultEnabled"} ), sort_table = Table.Buffer( Table.Sort( expand_default_enabled, { {"PID", Order.Ascending}, {"Name", Order.Ascending} } ) ) in sort_table
Thank you for all your help. I've been trying to solve for this one last item but cannot seem to get it right. I was able to replicate your setup and that helped a ton. I am able to choose one of the model PIDs and the _defaultenabled column will update accordingly.
Ultimately, I'm hoping to compare one PID on the left against one of the model PIDs.
The piece I cannot figure out is now how can I select a PID on the left to compare against.
An option to select say PID 105, and have it filter down to PID 105 compared against PID 25418 in the _defaultenabled column.
I think I know the problem, just can seem to get it right. If I put a PID Slicer from the full table, anything I select will blank out the compare table. I'm guessing because we're explicitly filtering on a PID. Or, another way, trying to filter based on two PIDs. I've been trying to edit interactions but not getting anywhere.
Is is possible now to add another PID filter for all the PIDs so that a user can choose the PID, then choose the model PID, and see the display as one against the other.
For context, there are over 2000 PIDs, 3 Model PIDs, and 177 Settings, making this a really large display.
I appreciate your help a ton...
To do this you would need two separate tables for slicing PIDs. The table for selecting the default PID should not be related to the main table. The table for selecting the comparison PID can be related to the main table.
I attached a pbix file with this example model.
- stuntmanpatch10 months agoRegular Visitor
Thank you!!! jgeddes That did the trick. My err was trying to associate the new Default PID table to the matrix. Once I pulled out that mapping it all flows as expected. Thanks again.