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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Create new column from values within table

Hi All,

 

I would like to create another column that takes the Good Parts value from theLine D10Cell4 and divides it with the quantitiy value from theLine D10Cell1 of that date. That's the method I have been trying and have labeled it 1st in the picture below.

 

I believe algebraically you can get the same value by adding the Bad % for that day. I have labeled that 2nd in the picture below.

Let me know if I can be more clear.

I will attach csv file.

Thanks!

 

algebraically.JPG

 

MonthDaytheLinequantityGood PartsFPY %Bad PartsBad %
February2D10Cell1157981577599.85%230.15%
February2D10Cell2157371528697.13%4512.87%
February2D10Cell3152881508398.66%2051.34%
February2D10Cell4150591446996.08%5903.92%
February3D10Cell1182621814999.38%1130.62%
February3D10Cell2180811763797.54%4442.46%
February3D10Cell3175141729398.74%2211.26%
February3D10Cell4172031649295.87%7114.13%
February4D10Cell1272012705299.45%1490.55%
February4D10Cell2269962609096.64%9063.36%
February4D10Cell3260152565498.61%3611.39%
February4D10Cell4255472489197.43%6562.57%
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

Create  a calculated column as below:

 

1st Column =
VAR Quantity1 =
    CALCULATE (
        SUM ( 'Table'[quantity] ),
        FILTER (
            'Table',
            'Table'[Day] = EARLIER ( 'Table'[Day] )
                && 'Table'[theLine] = "D10Cell1"
        )
    )
VAR GoodParts =
    CALCULATE (
        SUM ( 'Table'[Good Parts] ),
        FILTER (
            'Table',
            'Table'[Day] = EARLIER ( 'Table'[Day] )
                && 'Table'[theLine] = "D10Cell4"
        )
    )
RETURN
    DIVIDE ( GoodParts, Quantity1 )

 

 

Here is  sample :

11.png
URL:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EY_oFBGTlqZBocDvCYn3eycB4zG_9paEjXWU4ARWcNjGsw?e=xMxkUK 

 

Best Regards,
Community Support Team _ Eason
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
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

Create  a calculated column as below:

 

1st Column =
VAR Quantity1 =
    CALCULATE (
        SUM ( 'Table'[quantity] ),
        FILTER (
            'Table',
            'Table'[Day] = EARLIER ( 'Table'[Day] )
                && 'Table'[theLine] = "D10Cell1"
        )
    )
VAR GoodParts =
    CALCULATE (
        SUM ( 'Table'[Good Parts] ),
        FILTER (
            'Table',
            'Table'[Day] = EARLIER ( 'Table'[Day] )
                && 'Table'[theLine] = "D10Cell4"
        )
    )
RETURN
    DIVIDE ( GoodParts, Quantity1 )

 

 

Here is  sample :

11.png
URL:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EY_oFBGTlqZBocDvCYn3eycB4zG_9paEjXWU4ARWcNjGsw?e=xMxkUK 

 

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

amitchandak
Super User
Super User

I think it is a case of category min-max, where category is day,

Refer :https://community.powerbi.com/t5/Desktop/highest-value-by-category/td-p/428758

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.