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

Change in Efficiency of Manufacturing parts

Hello,

 

I am trying to find the change in median efficiency of the manufacturing of different parts over time. I'm most interested in finding the change in efficiency of the last time a part was run vs the previous time for all parts. I would also like to look at the efficiency of the production of part ID by month. Here is a look at my data.

 

 

 

fdas.PNG

 

Thanks in advance!

1 ACCEPTED SOLUTION

Hi @JoeKat07,

 

Since you have a big table, we can do it step by step. The steps below are all created in the Data view.

1. Get the previous date.

PreviousDate =
VAR currentid = [Part ID]
VAR currentDate = [Transaction Date]
RETURN
    CALCULATE (
        MAX ( [Transaction Date] ),
        FILTER (
            'Table1',
            'Table1'[Part ID] = currentID
                && 'Table1'[Transaction Date] < currentDate
        )
    )

2. Get previous efficiency.

PreviousEfficiency =
VAR CurrentDate = [PreviousDate]
VAR CurrentID = [Part ID]
RETURN
    CALCULATE (
        MAX ( [DailyEfficiency] ),
        FILTER (
            'Table1',
            Table1[Transaction Date] = CurrentDate
                && 'Table1'[Part ID] = CurrentID
        )
    )

3. Evaluate the change.

 

EfficiencyChange =
IF ( [PreviousEfficiency] = 0, 0, [DailyEfficiency] - [PreviousEfficiency] )

Change in Efficiency of Manufacturing parts2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @JoeKat07,

 

1. Add a Calculated Column "DailyEfficiency", which would make this question simple.

DailyEfficiency =
DIVIDE ( [Good Qty], [Hours Worked], 0 )

2. Create a measure "DailyChage". 

DailyChange =
VAR previousDate =
    CALCULATE (
        MAX ( 'Table1'[Transaction Date] ),
        FILTER (
            ALL ( 'Table1'[Transaction Date] ),
            'Table1'[Transaction Date] < MIN ( 'Table1'[Transaction Date] )
        )
    )
VAR previousEfficiency =
    CALCULATE (
        MAX ( 'Table1'[DailyEfficiency] ),
        'Table1'[Transaction Date] = previousDate
    )
RETURN
    IF (
        ISBLANK ( previousDate ),
        0,
        previousEfficiency - MAX ( 'Table1'[DailyEfficiency] )
    )

3. Create another measure "MonthlyEfficiency".

MonthlyEfficiency =
DIVIDE ( SUM ( Table1[Good Qty] ), SUM ( Table1[Hours Worked] ), 0 )

4. Create visuals. Pay attention to the fields.

Change in Efficiency of Manufacturing parts.JPG 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can try it in this file: https://1drv.ms/u/s!ArTqPk2pu-BkgSsSgxbuxWU-vlkS.

 

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.

My database was too large to run the opeartion for the change in efficiency, i kept getting "running out of memory" errors,

 

The only to find the monthy efficiency works great!

Hi @JoeKat07,

 

Since you have a big table, we can do it step by step. The steps below are all created in the Data view.

1. Get the previous date.

PreviousDate =
VAR currentid = [Part ID]
VAR currentDate = [Transaction Date]
RETURN
    CALCULATE (
        MAX ( [Transaction Date] ),
        FILTER (
            'Table1',
            'Table1'[Part ID] = currentID
                && 'Table1'[Transaction Date] < currentDate
        )
    )

2. Get previous efficiency.

PreviousEfficiency =
VAR CurrentDate = [PreviousDate]
VAR CurrentID = [Part ID]
RETURN
    CALCULATE (
        MAX ( [DailyEfficiency] ),
        FILTER (
            'Table1',
            Table1[Transaction Date] = CurrentDate
                && 'Table1'[Part ID] = CurrentID
        )
    )

3. Evaluate the change.

 

EfficiencyChange =
IF ( [PreviousEfficiency] = 0, 0, [DailyEfficiency] - [PreviousEfficiency] )

Change in Efficiency of Manufacturing parts2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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
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.