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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
gauravnarchal
Post Prodigy
Post Prodigy

IF Statement with filter measure

Dear All

 

I need your help on this measure.. 

 

If a month difference is >12 it should return the result as "Existing Client" else all other clients should be ignored and should not show in the results.

 

Can i add a filter in the below IF statement measure?

 

GN Customer Status =
IF([GN Months Difference]>12,"Existing Client")
2 REPLIES 2
amitchandak
Super User
Super User

@gauravnarchal , You can get last purchase date for the customer from this blog

https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

 

if(datediff([last sales/purcahse],today(),month)<12, "Existing Client")

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AllisonKennedy
Super User
Super User

You could try the FILTER function. How are you using this measure? You can always filter the visual to remove 'blank' or 'null' values that will currently be returned by your IF statement.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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