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

View all the Fabric Data Days sessions on demand. View schedule

Reply
iBot
Regular Visitor

how to Select data by date?

Hey guys,

 

i have one table (data basis) with units (apartments) and two columns with dates. All these apartments in the table are for rent. One column contains the start date where the apartment has no renter. The second column contains the last date before the start of a new contract or its null if we dont have a new contract.

 

Now i want to select a combination of month and year on my report and i want to see a table of the aparments which were empty in the selected month-year-combination.

 

So far i create a date table and the month-year-combinationen but i dont understand how i could connect this with the table results.

 

I hope you understand my problem and can help me.

Thank you.

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @iBot 

 

Keep your Date table and Rent table disconnected. Put Date column from Date table into a slicer on the page. Then create the following measure and use it as a visual-level filter on the table visual. Set it to show items when value is 1. 

IsEmpty = 
VAR _selectDate = MAX('Calendar'[Date])
VAR _tbl_empty = SELECTCOLUMNS(FILTER(RentData,RentData[Start Date]<=_selectDate && (RentData[End Date]>=_selectDate || ISBLANK(RentData[End Date]))),"__apartment",RentData[Apartment])
RETURN
IF(SELECTEDVALUE(RentData[Apartment]) IN _tbl_empty, 1, 0)

vjingzhang_0-1647311925939.png

 

Please download the attachment to see details. Note that I filter the result by a date rather than month as I am not sure whether an empty period would always be complete months in your data. If your requirement is more complicated, please share some sample data to help us understand it better. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @iBot 

 

Keep your Date table and Rent table disconnected. Put Date column from Date table into a slicer on the page. Then create the following measure and use it as a visual-level filter on the table visual. Set it to show items when value is 1. 

IsEmpty = 
VAR _selectDate = MAX('Calendar'[Date])
VAR _tbl_empty = SELECTCOLUMNS(FILTER(RentData,RentData[Start Date]<=_selectDate && (RentData[End Date]>=_selectDate || ISBLANK(RentData[End Date]))),"__apartment",RentData[Apartment])
RETURN
IF(SELECTEDVALUE(RentData[Apartment]) IN _tbl_empty, 1, 0)

vjingzhang_0-1647311925939.png

 

Please download the attachment to see details. Note that I filter the result by a date rather than month as I am not sure whether an empty period would always be complete months in your data. If your requirement is more complicated, please share some sample data to help us understand it better. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thanks for the detailed solution!!

jaideepnema
Solution Sage
Solution Sage

Hi @iBot ,

Can you share a sample dataset to have a better understanding of your query ?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors