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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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.  

 

Christina_C_1-1689281976117.png

 

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?

Christina_C_2-1689282646835.png

 

 

Thank you!

Christina

1 REPLY 1
lbendlin
Super User
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-...
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/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.