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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TriveniN
Helper II
Helper II

How to get below result

Hi,

Requirment : If user select next months like below screenshot and 

If property is having both 'current' and 'pending' lease status then we need to get 'Current'

If property is having only 'pending' lease status then we need to get 'pending' based on month selection.

TriveniN_0-1704715927356.png

 

Used below logic 

AllMnts_Count of Propertiess =
VAR _minD = CALCULATE(MIN(Datecalendar[TheDate]))
VAR _maxD = CALCULATE(MAX(Datecalendar[TheDate]))
VAR _Day = IF(MONTH(_maxDIN {1,3,5,7,8,10,12}, 31IF(MONTH(_maxDIN {4,6,9,11}, 3028) )
VAR _minDate = DATE(YEAR(_minD),MONTH(_minD),1)
VAR _maxDate = DATE(YEAR(_maxD),MONTH(_maxD),_Day)
RETURN
CALCULATE(DISTINCTCOUNT(LEASE_EXPIRATION[Property_ID__c]),
NOT LEASE_EXPIRATION[Yardi_Lease_Status__c] in { "Canceled","Past"}
&& LEASE_EXPIRATION[Lease_Sign_Date__c] <> BLANK()
&& LEASE_EXPIRATION[MTM_Start_Date__c] = BLANK()
            ,
FILTER(LEASE_EXPIRATION,
LEASE_EXPIRATION[Lease_End_Date__c] >= _minDate && LEASE_EXPIRATION[Lease_End_Date__c] <= _maxDate) )

 

I will provide detailed data for requirment.

Please look below detailed data.

Property IDMarketLease EndDateMTM StartDateRenewal DateLease StatusLease_Sign_Date__cMTM_End_Date__cProperties
ATL00001Atlanta1/4/2024 0:00 11/6/2023 0:00Current12/29/2021 0:00 1
ATL00001Atlanta1/5/2026 0:00  Pending12/29/2021 0:00 1
ATL00033Atlanta2/17/2024 0:00  Current2/12/2022 0:00 1
ATL00033Atlanta2/17/2025 0:00  Pending2/12/2022 0:00 1
ATL00430Atlanta4/1/2025 0:00  Pending12/23/2023 0:00 1
CLT00230Charlotte1/26/2024 0:00 11/15/2023 0:00Current1/18/2023 0:00 1
CLT00230Charlotte4/26/2025 0:00  Pending1/18/2023 0:00 1
SAT00220San Antonio3/11/2025 0:00  Current11/30/2023 0:00 1

 

Expected Result is heighlethed in yellow color.

TriveniN_1-1704715927375.png

 

 

1 REPLY 1
lbendlin
Super User
Super User

Your expected result is not legible. Please provide a larger screenshot.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.