Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

IF Statement - Overriding Filter Context

Hi Community! 

 

I need help overriding the date filter context (of 7/1) for the Customer Ordered and Last Order Date DAX formulas so the highlighted areas below will be filled in.  

 

 

Dax formula for Customer Ordered: 

Customer Ordered = 
IF('DIM Invoice'[Posting Date]>='DIM Invoice'[First Day of Month],"Yes", "No")

 

DAX formula for Last Posting Date:

Last Order Date = CALCULATE(MAX(DIM Invoice[Posting Date]), FILTER(DIM Invoice,DIM Invoice[Document Type] = "Invoice" || DIM Invoice[Document Type] = "Open Order"))

 

My hunch is I need to add in the ALL function, but unsure how to incorporate.

 

Also if I remove the date filter, it won't show "No" for customers who have never ordered.  Is there a way to incorporate a ISBLANK() function as well?

 

 

Thank you!

Christina

1 Reply