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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bhmiller89
Helper V
Helper V

Filtered min function

I have production data that lists sales. I need to calculate Total Sales for anything other than the original sale. Example:

 

I have Sale Date, Sale Amount, Client Name

 

I was thinking somehow I need to use

 

DellProduction = CALCULATE([Sales Total], 'dpmgr vwJMWebSalesOpportunitiesProduction'[CloseDate] <> MINA('dpmgr vwJMWebSalesOpportunitiesProduction'[CloseDate]))

 

but keep getting an error

1 ACCEPTED SOLUTION
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

I too don't know what you mean by "other than the original sale", but I can tell you why you are getting an error.  The filter argument for your CALCULATE function cannot compare a column with a calculated value the way you have it set up.  It needs a hard coded value and could do it this way: 'dpmgr vwJMWebSalesOpportunitiesProduction'[CloseDate] <> "12/12/2016"

 

Otherwise, you will need to wrap the MINA function in a VALUES function.  Additionally, you may need to wrap all this inside a FILTER function, but it is impossible to test without any sample data.

View solution in original post

2 REPLIES 2
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

I too don't know what you mean by "other than the original sale", but I can tell you why you are getting an error.  The filter argument for your CALCULATE function cannot compare a column with a calculated value the way you have it set up.  It needs a hard coded value and could do it this way: 'dpmgr vwJMWebSalesOpportunitiesProduction'[CloseDate] <> "12/12/2016"

 

Otherwise, you will need to wrap the MINA function in a VALUES function.  Additionally, you may need to wrap all this inside a FILTER function, but it is impossible to test without any sample data.

Mi2n
Microsoft Employee
Microsoft Employee

What do you mean by "anything other than the original sale". Can you provide sample data and some screenshots for better understanding your problem?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors