Forum Discussion
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
- lbendlin
Super User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523