Forum Discussion

gra_wang's avatar
gra_wang
Helper I
8 years ago

Stuck on 'Working on it'

I have two tables (refCase and refCaseQueue) of imported data, each with over 1.5 million rows and both share a common column: [CaseID].

All I want is the number of different case queues per Case ID. To this end, I created this column in the refCase table:

Queue Count =
CALCULATE(DISTINCTCOUNT(refCaseQueue[Queue Check]),FILTER(refCaseQueue,
  (refCaseQueue[CaseID]=EARLIER([CaseID]))))

PowerBI desktop has been 'Working on it' for the past several hours. Is this a bug? Is there a different formula I should be using? I have restarted PowerBI a few times and have even replicated the issue in PowerPivot in Excel and got the same result.

6 Replies

  • I don't think you need to create this measure, I guess you set the relationship between those two table on caseid, following these steps:

     

    1. add table visual

    2. add case id and make sure it is not aggregated

    3. drop queue name or id and press arrow next to it, and select distinct count.

     

    this will do it

     

     

    • gra_wang's avatar
      gra_wang
      Helper I

      Suppose I needed to make this a column a part of the data table as opposed to creating a visual. Why would this calculation continue to calculate endlessly where as a table visual would not?

      Is there an alternate formula I can use to achieve the same result without 'breaking' PowerBI?

      • parry2k's avatar
        parry2k
        Super User

        well what i told you,can be used anywhere, even in the visual.

         

        Your measure is something totally different and it is not doing what you are expecting. You can find many articales on "Earlier" function,  and I can tell you that is the root cause why your measure is taking forever.