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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Absolute Diff formula works but it slows down my report

I am using the following 3 formulas to determine the absolute difference between all similar inventory transactions and the median value.  They work fine but they greatly diminish the speed of my report.  I've tested this by deleting the formulas and the report runs smoothly again.  How can I improve these formulas to get my desired result?  The table holds approx. 1.5 million rows.  Is it because the last formula is a column?  Is it because the sheer number of rows?  Is there a way to simplify all 3 formulas into one? 

 

Measure: [This tells me the median receipt quantity from the last 90 days of transactions available in the report]

Median Receipts =
CALCULATE(
    MEDIAN(InvTx[Qty]),
    InvTx[Tx Type] = "RECEIVING",
    ALLEXCEPT( InvTx, InvTx[Station], InvTx[Other Inv Name], InvTx[IMF], InvTx[Inv Name] )
)

 

Measure: [This tells me the absolute difference as a percentage]

% Diff Median Receipts =
IF( SUM(InvTx[Qty]) = 0, "0 Qty Rec",
    ABS( SUM(InvTx[Qty]) / [Median Receipts] ) -1
)

 

Column:  [This allows me to classify the results into a category for easier analysis]

Tx Category C =
IF( InvTx[% Diff Median Receipts] = "0 Qty Rec", "0 Rcpt",
    IF( InvTx[Median Receipts] = 0, "0 Median",
        IF(InvTx[% Diff Median Receipts] < -.70, "Below",
            IF(InvTx[% Diff Median Receipts] >= -.70 && InvTx[% Diff Median Receipts] < .70, "Average",
                IF(InvTx[% Diff Median Receipts] >= .70, "Above"
                )
            )
        )

    )

)

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

 

So, no issues here?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Disregard, It didn't have anything to do with the formulas but in the slicer that inadvertently got changed.

Hi @Anonymous,

 

 

So, no issues here?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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