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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Leng28
Frequent Visitor

RT Measure very slow when selecting a recent date and super fast when selecting a date long time ago

Hello, 

 

i have a small problem. I have a table with sales over time (date time) each day is represented in a csv file. I visualise the sales over time in a line chart (time is rounded to the nearest half hour to reduce computing power). When i select a date long ago (01.12.2021) the visual will update almost immediately. When i select a date in the last days it takes 20-25 times longer. Each day has +-1000 the same row count. Any idea why that happens?

 

Thanks in advance 🙂

3 REPLIES 3
Leng28
Frequent Visitor

Hey @amitchandak,

 

this is the formula im using: 

 

Average Sales =
'Measure Table X'[RT Sales] / 'Measure Table X'[RT Rows]
 
RT Sales = CALCULATE(
Sum('X'[Sales]),
'X'[Time rounded] <= Max('X'[Time rounded]))
 
RT Rows = CALCULATE(
COUNTA('X'[Time rounded]),
'X'[Time rounded] <= Max('X'[Time rounded]))
 
I am not using a date table at the moment. 
amitchandak
Super User
Super User

@Leng28 , Share the formula.

 

Also, make sure you are using date table.

Change the join from date to int field 

 

Date key = year([Date])*10000 + month([Date]) *100 + day([date])

I think that the measure calculates the rt for the whole column and then the filter will apply. Thats why the calcualtion for specific dates (long ago) ist extreme fast and the other dates (recent days) is very slow. Any idea how i can apply a filter to the measure so only the selected date willm be calculated?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.