cancel
Showing results for
Did you mean:
Frequent Visitor

## How to add these two columns?

Example.zip in dropbox

I'm working on a Production Dashboard in Desktop to track 2 production schedules: Production A (Jan-May) and Production B (July-Dec).

Production techs will fulfil orders using the Schedule Targets. They can fulfil these targets using existing inventory when available. If inventory doesn't exist in their spec, they'll have to create inventory.

Production techs will update their Delivery excel worksheet when they have completed a part in their spec for their production schedule. A part cannot be consumed in Schedule A and Schedule B.

The following excel charts are updated frequently to track production and delivery status:

• Schedule Delivery
• Inventory

The following excel chart is updated twice a year by a manager at the end of a project:

• Schedule A Targets
• Schedule B Targets

The following excel charts are for reference only and do not need to be updated:

• Item Classifications

What I need help with:

I need to add 2 columns to the Production needed chart:

1. Parts to Create (PTC)-
If (Sum of design > Count of Part),Then PTC= Sum of design minus count of part.
If (Sum of design <= Count of Part),Then PTC= 0
2. Parts to Review (PTR)-
If (Sum of design > Count of Part),Then PTR = count of part.
If (Sum of design <= Count of Part),Then PTR = Sum of design

Is this possible with DAX, measures, or new columns?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super Contributor

## Re: How to add these two columns?

Hi @mhunt ,

Thank you for the clear explanation, and the pbix. Build a measure that is the sum, and another for the count, then:

```PTC = IF([Sum of Design]>[Count of Part],([Sum of Design]) - ([Count of Part]),0)

PTR = IF([Sum of Design]>[Count of Part],[Count of Part],[Sum of Design])```

Obviously these are for Schedule A
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

2 REPLIES 2
Highlighted
Super Contributor

## Re: How to add these two columns?

Hi @mhunt ,

Thank you for the clear explanation, and the pbix. Build a measure that is the sum, and another for the count, then:

```PTC = IF([Sum of Design]>[Count of Part],([Sum of Design]) - ([Count of Part]),0)

PTR = IF([Sum of Design]>[Count of Part],[Count of Part],[Sum of Design])```

Obviously these are for Schedule A
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

Frequent Visitor

## Re: How to add these two columns?

That's PERFECT! Thank you so much! And a fast response.

Announcements

#### New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (2,919)