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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
qLollo
Frequent Visitor

Visual loading time is taking forever

Hi all,

I've been having issues with my report, in particular, with 2 visuals.

My dataset is pretty big, i have 40+ tables, each one has god knows how many rows, but that's not the problem, because yeah maybe the visuals may take a few seconds more than normal, but all my 9 pages of my report work fine, all the filters and stuff.
The slow loading comes when i use the measure below in a Matrix visual:

OUT CPA = 

VAR OUT = SUMMARIZE('CC Call','CC Call'[AGENT_ID], 'Last Sale Aging History'[Aging Cluster English Desc],'Customer History - Last Interaction'[Interaction Last 12 Months Flag], 'Customer Lifecycle History'[Customer Type Group],

"GroupBy", SWITCH(TRUE(),

SELECTEDVALUE('Last Sale Aging History'[Aging Cluster English Desc]) = "USER - Hot" && SELECTEDVALUE('Customer History - Last Interaction'[Interaction Last 12 Months Flag]) = 1, (1.99 * [OUT Useful Contact]) + (2.67 * [OUT Call Appointment Booked]),

SELECTEDVALUE('Last Sale Aging History'[Aging Cluster English Desc]) = "USER - Hot" && SELECTEDVALUE('Customer History - Last Interaction'[Interaction Last 12 Months Flag]) = 0, (1.99 * [OUT Useful Contact]) + (2.94 * [OUT Call Appointment Booked]),

SELECTEDVALUE('Last Sale Aging History'[Aging Cluster English Desc]) = "USER - Churn Risk" && SELECTEDVALUE('Customer History - Last Interaction'[Interaction Last 12 Months Flag]) = 1, (1.99 * [OUT Useful Contact]) + (3.02 * [OUT Call Appointment Booked]),

SELECTEDVALUE('Last Sale Aging History'[Aging Cluster English Desc]) = "USER - Churn Risk" && SELECTEDVALUE('Customer History - Last Interaction'[Interaction Last 12 Months Flag]) = 0, (1.99 * [OUT Useful Contact]) + (4 * [OUT Call Appointment Booked]),

SELECTEDVALUE('Last Sale Aging History'[Aging Cluster English Desc]) = "USER - Cold" && SELECTEDVALUE('Customer Lifecycle History'[Customer Type Group]) = "CUSTOMER", (1.99 * [OUT Useful Contact]) + (2.09*[OUT Call Appointment Booked]),

SELECTEDVALUE('Customer Lifecycle History'[Customer Type Group]) = "LEAD" || SELECTEDVALUE('Customer Lifecycle History'[Customer Type Group]) = "PROSPECT", (1.99 * [OUT Useful Contact]) + (2.09*[OUT Call Appointment Booked])))

VAR NUM = SUMX(OUT, [GroupBy])

VAR DEN = [OUT Call Appointment Booked]

return divide(NUM, DEN)


Long story short, i need to make a calculation based on a big IF, with each condition has a calculation.

This big switch is probably the problem of the loading time, but i wouldn't know how to optimize this.

Thanks






1 ACCEPTED SOLUTION
ribisht17
Super User
Super User
4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @qLollo ,

 

After reviewing the formulas you provided, there does not seem to be a complex calculation logic. I think it is indeed a problem caused by loading a data set that is too large.
What is your data source? Is it possible to do some filtering of the data before importing (filtering out the parts that are not relevant to the calculation), which would optimize the speed of loading.


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Hi @v-henryk-mstf ,

I've been able to reduce the loading time from 10 mins to 2-3mins just by changing the formula, and making it as the IF does firstly the condition with the most amount of rows, so it will not waste time checking a lot of rows, i think it's not possible to reduce the time more than this, since i can't filter the data more or reduce the data set, so i consider this solved.

ribisht17
Super User
Super User

qLollo_0-1649684022988.png

I have already tried using it, also tried to clean up the code, but haven't gone too far..

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors