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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
oren
Helper III
Helper III

create measure comparing dates from different tables

HI

 

i have a table with column "date from" and  column "date to"

and anothe table with all dates isung it as a filter

i want to creat a measure which will give me "true" or "false" if the date in the filter is in the range of the "datefrom" -"dateto"

examp - date from = 1/1/2020 date to 9/1/2020 , if i click the filter 10/1/2020 i'll get "false" and if the filter say 2/1/2020 it will be "treu"

 

thank you!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@oren
You can create the following measure by checking the attached pbix if necessary.

Medida: IF(SELECTEDVALUE('Table 2'[Date]) en VALUES('Table'[Date]),TRUE(),FALSE())
date in valus true false.PNG
Paul Zheng _ Community Support Team
If this post helps, please accept it as the solution to help the other members find it faster.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@oren
You can create the following measure by checking the attached pbix if necessary.

Medida: IF(SELECTEDVALUE('Table 2'[Date]) en VALUES('Table'[Date]),TRUE(),FALSE())
date in valus true false.PNG
Paul Zheng _ Community Support Team
If this post helps, please accept it as the solution to help the other members find it faster.
amitchandak
Super User
Super User

@oren , Try measure like

measure =
if(isblank(max(Date[Date])),0,1)

 

or


measure =
var _min =minx(allselected(date),date[date])
var _max =maxx(allselected(date),date[date])
return
if(isblank(calculate(countrow(Table), filter(Table, Table[Date] <=_max && Table[Date] >=_min))),0,1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.