Forum Discussion

adrian33's avatar
adrian33
Regular Visitor
4 years ago

Problem with loading time of 1 column

Hi, 

I want to use in my dashboard table with only 23 results, but that table takes sometimes more than 5 sec loading. What should i change in this dax code if I can enything. I thing that table like this should load immediately or faster than 5 sec 🙂

 

// DAX Query
DEFINE
  VAR __DS0FilterTable = 
    TREATAS({BLANK()}, 'rp OneTimeUseFlagDispositions'[OneTimeUseFlagDispoistionName])

  VAR __DS0FilterTable2 = 
    TREATAS({"GMC",
      "Lexus",
      "NISSAN",
      "Toyota",
      "FORD"}, 'rp Books'[OemName])

  VAR __DS0Core = 
    CALCULATETABLE(
      DISTINCT('rp OemIqSections'[OemIqSectionName]),
      KEEPFILTERS(__DS0FilterTable),
      KEEPFILTERS(__DS0FilterTable2)
    )

  VAR __DS0PrimaryWindowed = 
    TOPN(501, __DS0Core, 'rp OemIqSections'[OemIqSectionName], 1)

EVALUATE
  __DS0PrimaryWindowed

ORDER BY
  'rp OemIqSections'[OemIqSectionName]

4 Replies