Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

SWITCH slower than before October 2021 update

Hi,

 

Anyone else experiencing performance issues with the SWITCH function since the October 2021 update?

 

It was mentioned that the performance of SWITCH was improved, especially if the function has a large number of values, but I am seeing the opposite.

 

I have a SWITCH / TRUE measure with around 500 lines and the performance is terrible.

It takes around 5-10 seconds just to add another line. Before it was instant.

 

It simply renames some names, example of a couple of lines:

 

New Name =
SWITCH ( TRUE(),
'Receipt Status'[Name Old] = "ABB Electrification Canada SRI", "ABB",
'Receipt Status'[Name Old] = "ABB Power Electronics Inc.", "ABB",
'Receipt Status'[Name Old] = "Acal BFI", "Acal BFI",
'Receipt Status'[Name Old] = "ACAL BFI UK (GBP)", "Acal BFI",
'Receipt Status'[Name Old] = "ACAL BFI UK (USD)", "Acal BFI",
 
Thanks!

 

  • Anonymous ,  Please check if someone reported a similar issue https://community.powerbi.com/t5/Issues/idb-p/Issues

     

    Try this one like 

    New Name =
    SWITCH ( 'Receipt Status'[Name Old] ,
     "ABB Electrification Canada SRI", "ABB",
     "ABB Power Electronics Inc.", "ABB",
     "Acal BFI", "Acal BFI",
     "ACAL BFI UK (GBP)", "Acal BFI",
     "ACAL BFI UK (USD)", "Acal BFI",

    //Others

    )

2 Replies

  • Anonymous ,  Please check if someone reported a similar issue https://community.powerbi.com/t5/Issues/idb-p/Issues

     

    Try this one like 

    New Name =
    SWITCH ( 'Receipt Status'[Name Old] ,
     "ABB Electrification Canada SRI", "ABB",
     "ABB Power Electronics Inc.", "ABB",
     "Acal BFI", "Acal BFI",
     "ACAL BFI UK (GBP)", "Acal BFI",
     "ACAL BFI UK (USD)", "Acal BFI",

    //Others

    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, that works better!