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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tiffanyt123
Helper I
Helper I

Need help with DAX measure with filters for unique keys (Real Estate Data)

This project is regarding Real Estate Data.

 

For a particular unique key, I would like to fill up the [Status3] column with 1) "Committed", 2) "Pre-committed" or 3) "Future Vacant", depending on the date selected from a calendar table.

 

The logic should be as follows:

"Committed": [Status] = "Occupied" (for date selected) AND [Status] = "Occupied" (for the next record with [Valid From Date] beyond date selected)

e.g. Date selected = 31 Mar 2022, corresponds to row 5 which has [Status] = "Occupied, and the next record row 6 has [Valid From Date] = 1 May 2022 with [Status] = "Occupied", therefore [Status3] of row 5 should be "Committed".

tiffanyt123_0-1674986859673.png

 

"Pre-committed": Same as "Committed", except that [Status] = "Vacant" (for date selected).

tiffanyt123_2-1674987414824.png

"Future Vacant": If the next row (assuming date is sorted in ascending order) is MAX([Valid From Date]) of the particular RO_KEY AND next row has [Status] = "Vacant".

tiffanyt123_1-1674987273685.png

 

My eventual goal is to have just the [RO_KEY] and [Status3] columns, with [Status3] dynamically updating depending on the date I selected.

tiffanyt123_3-1674988026598.png

 

Any help would be supppppppppper appreciated. Attached is the PBI file. 🙂 

 

https://app.box.com/s/7k9yxdigd8scpb1t67xoa7m1eye4di8g

 

2 REPLIES 2
TonyZhou1980
Resolver I
Resolver I

Hi Tiffany,

 

Do you have other ways to upload the sample file for downloading and review?

 

Thank you,

Tony

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