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
Dunner2020
Post Prodigy
Post Prodigy

Speeding up calculated column time

Hi there,

 

 

I am calculating a column using DAx language.  The new column is the rolling sum of 48 half-hourly values. The calculation of column is :

 

calculated col = sumx(filter(Table1, Table1[EpochHH] > = Ealier(Table1[EpcohHH] )-47 && Table1[EpochHH] <= Ealier(Table1[EpcohHH] ) ), Table1[Value] )

 

In the above calculation, EpochHH is the unique number to identify a half-hour time slot within a day. I have got around 150,000 rows in Table1. When I ran the above command, it takes about 25 mins to calculate the new column. Is there any way to make the calculation quicker?

 

Sample file can be found here

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Dunner2020 ,

 

Check if the formula work.

 

calculated col = 
var tmp = filter(Table1,Table1[EpochHH] >= EARLIER(Table1[EpochHH])-47 && Table1[EpochHH] <= EARLIER(Table1[EpochHH]))
return
calculate(sum(Table1[value]),tmp)

 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Dunner2020 , This calculation seems fine. Can you please check how much RAM power bi is getting? Is enough memory available to power bi

 

Check if you can analyze the performance

https://www.youtube.com/watch?v=aYXRx0pZZcs

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.