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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jhsimb
Frequent Visitor

Cube.CollapseAndRemoveColumns slow after List.Buffer

Using List.Buffer for filtering in a column improved performance, but applying collapse (column) caused a significant slowdown in the query. Any help to this problem? Thanks in advance.

 

2 REPLIES 2
v-jingzhan-msft
Community Support
Community Support

Hi @jhsimb 

How do you apply collapse (column)? Can you provide the M code you used?

 

Best Regards,
Jing

Hi, here is the code:

 

#"Vendedor BAANV" = Cube.Transform(#"Filtro Supervisor",
{
{Cube.AddAndExpandDimensionColumn, "[Piramide Ventas]", {"[Piramide Ventas].[Piramide Ventas].[Vendedor BAANV]"}, {"Vendedor BAANV"}}
}),
Cliente = Cube.Transform(#"Vendedor BAANV",
{
{Cube.AddAndExpandDimensionColumn, "[Cliente]", {"[Cliente].[Por Cliente].[Cliente]"}, {"Cliente"}}
}),
Medidas = Cube.Transform(Cliente,
{
{Cube.AddMeasureColumn, "No. Clientes Efectivos", "[Measures].[No. Clientes Efectivos]"},
{Cube.AddMeasureColumn, "No. Clientes Ruta", "[Measures].[No. Clientes Ruta]"}
}),
ListQuery = List.Buffer(Lista),
#"Filas filtradas" = Table.SelectRows(Medidas, each (List.Contains(ListQuery,[Cliente])<>true )),
#"Columnas contraídas y quitadas" = Cube.CollapseAndRemoveColumns(#"Filas filtradas", {"Cliente"})
in
#"Columnas contraídas y quitadas"

 

Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors