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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

how to display a main table and another one with the details/Additional info of a line ?

Hello,

I have the following code that retrieves, for each line of my source, the lines from the same source where there is more than one similar model category per user :

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJRCs8vyi4uSSzJzM8D8oDIUClWJ1opKzexKBlD2is1MU9HwRciZQRWmF6SkZlahKHSvbS0WEchBCpnDFaakZeYmwrkOefn5pbmZSaD1Sq4pJZlJoOEPTKBOvwgSkzAGjKhGlCN9kwtgqszJd4NZqS6wZx4sy2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [assigned_to.user_name = _t, model_category.display_value = _t, assigned_to.name = _t, Index = _t]),
    #"Type modifié" = Table.TransformColumnTypes(Source,{{"assigned_to.user_name", type text}, {"model_category.display_value", type text}, {"assigned_to.name", type text}, {"Index", Int64.Type}}),
    
    #"Personnalisée ajoutée1" = Table.AddColumn(#"Type modifié", "IsUserNameAssigned", each if [assigned_to.user_name] = "" then "Blank" else "Not Blank"),
    #"Lignes filtrées1" = Table.SelectRows(#"Personnalisée ajoutée1", each ([IsUserNameAssigned] = "Not Blank")),
    #"Personnalisée ajoutée2" = Table.AddColumn(#"Lignes filtrées1", "Details", (k)=> Table.SelectRows(#"Lignes filtrées1", 
            each if [model_category.display_value] = "Workstation" then ([assigned_to.name] = k[assigned_to.name] and k[model_category.display_value] = "Workstation")
                                                                   else ([assigned_to.name] = k[assigned_to.name] and k[model_category.display_value] = "Communication Device"))),
    #"Personnalisée ajoutée3" = Table.AddColumn(#"Personnalisée ajoutée2", "nbMaterielParPersonne", each if Table.RowCount([Details]) > 1 then "MORETHANONE" else "ONLYONE"),
    #"Lignes filtrées2" = Table.SelectRows(#"Personnalisée ajoutée3", each ([nbMaterielParPersonne] = "MORETHANONE")),
    #"Lignes triées" = Table.Sort(#"Lignes filtrées2",{{"assigned_to.name", Order.Ascending}})
in
    #"Lignes triées"

 

With that, I know how to display the content in a table visual, but how can I have a second table visual that would display the content of the Details column (which is a Table, so with multiple lines) when a line is selected in the first table (it should display the details of all the lines selected in the first table visual) ?

Also, do you see a more efficient way than my steps because I had to let it run several hours to load when my real source is only 30000 lines ?

Or does it have to be done via 2 tables in Power Query side in order to have the display I wish ? If yes how please ?

1 REPLY 1
Anonymous
Not applicable

I have amended my post in order to give you a ready-to-test code

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors