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
qwaszx55
Frequent Visitor

Extremely slow measures.

Having issues with my measures being so slow that the visuals won't even load when doing direct query. Oddly enough this seems a rather recent issue but that is neither here nor there as I need to learn to optimize my measures anyway.

 

In short I have a table with:

 

QTY, PRICE, WARRANTYFLAG , OSI_LEASEDFLAG, ITEMTYPE

 

To determine what we sell as "equipment" or "recurring" or "Labor" I use the following to total them up for "equipment":

 

Equipment =
Calculate(
sumx (QuoteItem,QuoteItem[QTY]*QuoteItem[PRICE]),
filter( QuoteItem, QuoteItem[WARRANTYFLAG] <> "Y" && QuoteItem[OSI_LEASEDFLAG] <> "Y" && QuoteItem[ITEMTYPE] <> "L")
)

 

There has to be a faster measure as it is dog slow.

1 REPLY 1
popov
Resolver III
Resolver III

Hi, @qwaszx55

 

Try this formula 

Equipment =
SUMX (
    FILTER (
        QuoteItem,
        QuoteItem[WARRANTYFLAG] <> "Y"
            && QuoteItem[OSI_LEASEDFLAG] <> "Y"
            && QuoteItem[ITEMTYPE] <> "L"
    ),
    QuoteItem[QTY] * QuoteItem[PRICE]
)

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.