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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic Date IF Statement

Hi, 

 

I'm trying to do a simple IF Statment but it doesn't seem to work; I'm trying to created a calculate column to use as a customer filter. 

 

I'm looking at 3 Columns as listed below:

 

  1. (Measure) Date_Selected = CALCULATE(MAX('DATE'[Date]),ALLSELECTED('DATE'))
  2. dwh InventoryTenancy'[Start] = Colum from data set
  3. dwh InventoryTenancy'[End] = Colum from data set

In the below screen shot the highlighed "Exclude" should be "Include". 

 

IF - Date Selected.JPG

 

Any help is always appricated. 

Thanks 

Dobby Libr3 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

Do you check my answers above?

Capture5.JPG

these are all measures instead of columns

max selected = MAX('calendar'[Date])

Measure = IF([max selected]>MAX([start])&&[max selected]<=MAX([end]),"Include","exclude")

 

Best Regards

Maggie

View solution in original post

13 REPLIES 13

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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