Help with DAX for - Calculate MIn

JV0710

Active Member
Joined
Oct 26, 2006
Messages
440
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi

Please can I have help with the following query.

I have a PowerPivot file where I have columns for product, season value, and various measures e.g receipts

I am trying to create a column that will show the earliest season a product is received

example: I have a product that was received in Season 1, but has sales for all seasons.
In the column "Received season" I want to see season value " 1 " next to every occurrence of the product

currently I have the following dax formula but it is not working

=CALCULATE(MIN(Query[season value]),Query[MeasuresReceipts]>0)

Thank you in advance for your help

Joe
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hello!

Without seeing the workbook in context, have you attempted to throw in a FILTER() before the second param in the calculate? =CALCULATE(MIN(Query[season value]), FILTER(Query, Query[MeasureReceipts])>0)

Let me me know if that makes a difference.
 
Upvote 0
Good Morning

Thanks for the help. I have tried your suggestion but I get the following error when doing so:

" A function 'Filter' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

Thanks

Joe
 
Upvote 0
Hi

I have found a solution to the problem

The final result is the following DAX formula:

=CALCULATE(MIN(Query[season value]),ALLEXCEPT(Query,Query[product]))

Thanks

Joe
 
Upvote 0

Forum statistics

Threads
1,224,120
Messages
6,176,494
Members
452,732
Latest member
EWRUCK

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top