1. Registered User
Join Date
Apr 2014
Posts
12

Hello all,

I am having a problem with calculating a Min and Max. The scenario is as follows.

I have a column SKU and a column Price. I only want to get a Min and Max value if the SKU column has a value. The reason for this is because the data I am working with has shipping costs as a value in the Price column, but doesn't have an value in the SKU column.

Clearly, I don't want to include these shipping costs as a min or max because I only want to include products in the Min/Max.

Does anyone know how I can structure a DAX to accomplish this?

Thank you!

2. Registered User
Join Date
Apr 2014
Posts
12
I found the solution.

I used the following =CALCULATE(MAX([Price]),FILTER('All Consolidated',[Quantity]>0))

3. Registered User
Join Date
Dec 2004
Posts
37

## Array Formula

Try This

{=MIN(IF(E9:E27>0,F9:F27))}

Where E9:E27 is the SKU range and F9:F27 is the Column Price range

The curly brackets at the start and finish to denote an array formula are put there by using Control+Shift+Enter, you cannot just type them in.
so type

=MIN(IF(E9:E27>0,F9:F27))

and then while the cursor is still in the formual bar press Control+Shift+Enter

Hope this helps

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•