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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LillyLegenda
Helper III
Helper III

SUMX(Filter) Very Slow

Hi, I have a big dataset with 1,8 million rows which is in general performing very good but one formula is very slow.

Maybe you have an idea to make it faster.

 

Volume AutoCreated =
SUMX(
FILTER(
PurchaseOrders,
PurchaseOrders[AutoCreationFlag] = "AutoCreated"
),
PurchaseOrders[ValuePurchasedUSD]
)

 

Thank you very much for your help 🙂 

6 REPLIES 6
wdx223_Daniel
Super User
Super User

calculate(sum(PurchaseOrders[ValuePurchasedUSD]),PurchaseOrders[AutoCreationFlag] = "AutoCreated",ALL(PurchaseOrders))

Payeras_BI
Solution Sage
Solution Sage

Hi @LillyLegenda ,

Filtering only the column and not the entire table.

 

Volume AutoCreated =
CALCULATE (
    SUM ( PurchaseOrders[ValuePurchasedUSD] ),
    FILTER (
        ALL ( PurchaseOrders[AutoCreationFlag] ),
        PurchaseOrders[AutoCreationFlag] = "AutoCreated"
    )
)

 

 

 

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
mahoneypat
Microsoft Employee
Microsoft Employee

Please confirm that PurchaseOrders[ValuePurchaseUSD] is a column in your table, and not a measure.  If a measure, please provide the expression for it.  If a column, that is a straight forward expression and I am surprised that it is slow.  Can you say more about your model (relationships with other tables, visuals on your report page, etc.)?

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@LillyLegenda , Try this

 

calculate(sum(PurchaseOrders[ValuePurchasedUSD]),FILTER(
PurchaseOrders,
PurchaseOrders[AutoCreationFlag] = "AutoCreated"
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, but this is taking the same time maybe longer to load

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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