Forum Discussion
Custom columns in a SharePoint Page Library
- 4 years ago
Either do them both in the same step or else change the reference to the prior step. Your new step is referencing the step before the first remove nulls step.
Here's both in the same step:
let Source = SharePoint.Tables("https:URL_GOES_HERE", [Implementation="2.0", ViewMode="All"]), #"793529eb-48c3-4fad-a005-7a4aa0a716ad" = Source{[Id="793529eb-48c3-4fad-a005-7a4aa0a716ad"]}[Items], #"Removed Other Columns" = Table.SelectColumns(#"793529eb-48c3-4fad-a005-7a4aa0a716ad",{"Name", "Author Byline"}), #"Fix Non List Values" = Table.TransformColumns( #"Removed Other Columns", {{"Author Byline", each if Value.Is(_, type list) then _ else null}, {"Checked Out To", each if Value.Is(_, type list) then _ else null}} ) in #"Fix Non List Values"
If you remove those blank rows, does it give you the option to expand?
- MichaelHutchens4 years ago
Helper V
Hi AlexisOlson , it does, but there is data I need in those blank columns so I can't remove them. E.g. a blank space means that a page doesn't have an owner, which is also important for me to know so I can organize one.
For additional context, I'm working with 12 different page libraries, of which this is just one example. I've tried splitting out the table into two different ones (one filtered by whether the column has a [List] entry, and one filtered to only show blank rows), drilling down into the former, then merging the two separate tables back into one. That works fine for a single table, but my report slows down to a crawl now that I've added 6 of the 12 page libraries and I don't think it's scaleable. So I'm looking for a more elegant solution 🙂- MichaelHutchens4 years ago
Helper V
This seems to be what I need, but I don't know how to analyse the code to customize it to my scenario:
https://community.powerbi.com/t5/Power-Query/SharePoint-List-and-null-values/td-p/1761940- MichaelHutchens4 years ago
Helper V
Here's my current code, if it helps:
let Source = SharePoint.Tables("https:URL_GOES_HERE", [Implementation="2.0", ViewMode="All"]), #"793529eb-48c3-4fad-a005-7a4aa0a716ad" = Source{[Id="793529eb-48c3-4fad-a005-7a4aa0a716ad"]}[Items], #"Removed Other Columns" = Table.SelectColumns(#"793529eb-48c3-4fad-a005-7a4aa0a716ad",{"Name", "Author Byline"}) in #"Removed Other Columns"