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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
keny999
Regular Visitor

Slow calculate column measure

Hi,

i've got some measure that calculate cummulative of [Plan_Ilość], and it's in the calculate column but it is very slow, how can I do that it can be faster ?:

=

var _Rok_mc = Plan_prod_TTL_etap_0[Rok_m-c_2]

var _Kod = Plan_prod_TTL_etap_0[Kod_produktu]

return

CALCULATE(SUM(Plan_prod_TTL_etap_0[Plan_Ilość]);

KEEPFILTERS(

FILTER(

Plan_prod_TTL_etap_0;_Rok_mc>=Plan_prod_TTL_etap_0[Rok_m-c_2]
&&
_Kod=Plan_prod_TTL_etap_0[Kod_produktu])
);Plan_prod_TTL_etap_0)

5 REPLIES 5
keny999
Regular Visitor

Still very slow, nothing change and how can I put two or more conditions ?

Hi,

If the calculation is still very slow I suspect that the problem lies elsewhere. There are multiple way to optimize a model and it is hard to explain them here. For now I recommend checking your visuals using the built in  report analyzer or using tool like DAX studio or BPA analyzer in tabular editor.

ValtteriN_0-1643373686549.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I'm in the power pivot and have about 7 000 rows and when wrote the measure I'm waiting and waiting....:

keny999_0-1643373845829.png

 

Hi @keny999 ,

 

I think that your large amount of data and the complexity of the model are causing the calculated column to run slowly, please try to optimize the model. Data reduction techniques for Import modeling 

 

Also, according to the documentation, it is recommended that you create custom columns in Power Query (defined in M) instead of using DAX to create calculated columns, which will improve compression efficiency and reduce refresh time.

 

Best Regards,
Winniz

ValtteriN
Community Champion
Community Champion

Hi,

For running total I recommend this pattern:

Period RT =
VAR MaxDate = MAX ( 'Calendar'[Date] )
RETURN
CALCULATE (
SUM(Cumulativetotal[Value]),
'Calendar example'[Date] <= MaxDate,
ALL( 'Calendar' ) )


Also check this article by SQLBI about the topic:
https://www.sqlbi.com/articles/computing-running-totals-in-dax/


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.