Forum Discussion

pvarley's avatar
pvarley
Helper I
9 years ago
Solved

Power BI Desktop hangs when adding a column

I'm adding a column to an existing table. The table contains about 20,000 rows, so it should not take long, but after I hit Enter, Power BI Desktop says "Working on it" and never finishes. I have upd...
  • pvarley's avatar
    pvarley
    9 years ago

    Anonymous wrote:

    HI pvarley,

     

    I think the performanc issue is related to your masure, each measure will calculate throught the UsersTenants table. If this is a case, your calculate column will calculate about almost 1,368,000,000(19,000* 36,000*2) times.

     

    Regards,

    Xiaoxin Sheng


     

    That may be the problem. I worked around it by moving the string comparison into the query and generating two new columns in the UsersTenants table with True/False values. Now the measures just look at those two values, and the calculation is much faster. The new measures look like this:

     

    CALCULATE( DISTINCTCOUNT( UsersTenants[Email] ),
    FILTER( UsersTenants,
    UsersTenants[IsProvisioningUser] = FALSE && UsersTenants[IsInternalUser] = TRUE
    )
    )