cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mike_RPMed
New Member

Create Summary Table from Column Data

Hey All,

 

I am trying to create a pareto chart in PowerBI using some logged manufacturing data. Here is an example table of the entry log:

 

LotCodeFailure Mode 1Failure Mode 2Failure Mode 3Failure Mode 4Failure Mode 5
22082315VA15515121054
22083010VA236267214
22090102VA30480012
22082915VA101020038
22083001VA30405022
22090101VA407614026
22090707VA2187704
22091209VA4013436063
22090809VA10530033
22091208VA12111311059
22090810VA3186037024
22091310VA2010414057
22091915VA42714828064
22091903VA296412026
22091412VA103123222

 

I want to create a table in PowerBI that will make a row for each of the failure modes, and summarize the total in each category based upon whatever filter is active on the page (many other parameters are linked by lot or code). 

 

I imagine the output table being something like this with the total failures changing based upon the active filters, so that I can create an interactive pareto chart:

 

Failure ModeTotal Failures
Failure Mode 1184
Failure Mode 21157
Failure Mode 3215
Failure Mode 44
Failure Mode 5518

 

I've tried a bunch of things but can't seem to figure it out. The closest I think I've gotten is to try and make a measure for each failure mode, but I can't figure out how to put that into a table that I can create a pareto chart from.

 

Any help would be greatly appreciated, thanks in advance.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

I suggest having a unpivotted table like below.

Unpivotting operation can be done in Power Query Editor.

 

Jihwan_Kim_1-1663958399379.png

 

 

 

Jihwan_Kim_0-1663958386881.png

 

Failure pareto percent: = 
VAR _failure = [Total failure:]
VAR _allfailure =
    CALCULATE ( [Total failure:], ALLSELECTED ( Data[Failure Mode] ) )
RETURN
    DIVIDE (
        CALCULATE (
            [Total failure:],
            FILTER ( ALLSELECTED ( Data[Failure Mode] ), [Total failure:] >= _failure )
        ),
        _allfailure
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

I suggest having a unpivotted table like below.

Unpivotting operation can be done in Power Query Editor.

 

Jihwan_Kim_1-1663958399379.png

 

 

 

Jihwan_Kim_0-1663958386881.png

 

Failure pareto percent: = 
VAR _failure = [Total failure:]
VAR _allfailure =
    CALCULATE ( [Total failure:], ALLSELECTED ( Data[Failure Mode] ) )
RETURN
    DIVIDE (
        CALCULATE (
            [Total failure:],
            FILTER ( ALLSELECTED ( Data[Failure Mode] ), [Total failure:] >= _failure )
        ),
        _allfailure
    )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.