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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure taking too long to load

I created a measure to be used in a line graph that shows the number of nationalities over time.

 

However the visual is taking too long to load with over 250,000ms (from performance analyser).

 

Below is the measure that I am currently using:

count_unique_involved_parties =

VAR thisDate=selectedvalue(company_details[Registration Date])

VAR filters_var = FILTER(ALLSELECTED(company_details),company_details[Registration Date]<=thisDate)

RETURN

CALCULATE(DISTINCTCOUNT(auth_inv_bo[identification_document]), filters_var)

 

Any idea how I can optimise such measure to help the visual load faster

2 REPLIES 2
Anonymous
Not applicable

Hi Rico,

 

Thanks a lot for your reply. I have tried to change some features including the data source and reducing the amount of tables used. However, I still can't understand why when I check the performance analyzer of powerBi it still shows that most time to load is being taken by the DAX query (as you can see in the image).

 

Performance_analyzer.png

 

Thanks.

 

Kind Regards,

Francesca

Anonymous
Not applicable

Hi @Anonymous ,

 

You have use variables and selectvalue() which we could do to optimise dax. Your code is easy and I think there is no place for us to change on it. As far as I know, measure return too long may also caused by many other conditons.

You can optimize your solution at different architectural layers. Layers include:

  • The data source(s)
  • The data model
  • Visualizations, including dashboards, Power BI reports, and Power BI paginated reports
  • The environment, including capacities, data gateways, and the network

Here I suggest you to refer to below offical blog to learn more details.

For reference: Optimization guide for Power BI

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.