Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Fill down feature in query editor not working as expected

Hi,

 

My fill down feature is not working as I want it to

Feature IDUser StoryCommence DateWhat Power BI Fill Down will doWhat I Want
FID0012002/9/20212/9/20212/9/2021
FID001202 2/9/20212/9/2021
FID001203 2/9/20212/9/2021
FID0022002/10/20212/10/20212/10/2021
FID0029999 2/10/20212/10/2021
FID0029999 2/10/20212/10/2021
FID0029999 2/10/20212/10/2021
FID003203 2/10/2021-
FID003204 2/10/2021-
FID003205 2/10/2021-
FID003206 2/10/2021-

 

I have the expected column and what power bi is doing right now.

I just want the fill down transformation of Power BI to reset at each Feature ID

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcvN0MTAwVNJRMjIwAJH6lvpGBkaGSrE6KHJGQFIBXdAYVdAIyRRDAzRjQJKWQICphVhRY2x2QgRNsAmaYhM0gwjGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Feature ID" = _t, #"User Story" = _t, #"Commence Date" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Feature ID"}, {{"Data", each _, type table [Feature ID=nullable text, User Story=nullable text, Commence Date=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each [Data]{0}[#"Commence Date"]),
    #"Expanded Data" = Table.ExpandTableColumn(#"Added Custom", "Data", {"User Story", "Commence Date"}, {"User Story", "Commence Date"})
in
    #"Expanded Data"

lbendlin_0-1613178110849.png

 

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

After collapsing the subsections they are all tables called "Data".  From each table we grab the field "Commence Date" in the first row  (  {0}  ).  We then use that information to emulate the "fill-down by subsection"  behavior that you wanted to achieve

 

{ x }  = get row x

[ y ] = get column y 

lbendlin
Super User
Super User

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcvN0MTAwVNJRMjIwAJH6lvpGBkaGSrE6KHJGQFIBXdAYVdAIyRRDAzRjQJKWQICphVhRY2x2QgRNsAmaYhM0gwjGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Feature ID" = _t, #"User Story" = _t, #"Commence Date" = _t]),
    #"Grouped Rows" = Table.Group(Source, {"Feature ID"}, {{"Data", each _, type table [Feature ID=nullable text, User Story=nullable text, Commence Date=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each [Data]{0}[#"Commence Date"]),
    #"Expanded Data" = Table.ExpandTableColumn(#"Added Custom", "Data", {"User Story", "Commence Date"}, {"User Story", "Commence Date"})
in
    #"Expanded Data"

lbendlin_0-1613178110849.png

 

 

Anonymous
Not applicable

Thanks

Can you also explain this step:

[Data]{0}[#"Commence Date"]

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.