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

Find the rent based on date selected via filter

Hello everyone,

 

I have two tables namely,

Rent_Entity and Rent_Modification.

Rent Entity has all the information about the tenant/contract. Rent Modification is for any rent increase/decrease happened on the contract level.

 

Now let's say, if I have to select the rent roll for today, I will get all the latest data for the specific contract. But If someone asks me to provide the rent roll on a specific date in past, I need to have the rent for specific contract at that point of time.

 

For eg.

 

rent_entity    
idContract_Nametotal_renteinzugauszug
1070_M_05.01568.901-11-1980 

 

 

rent_modification      
contract_idold_valuenew_valuedifferencestatestart_dateend_dateKind
10518.9568.950approved1-Feb-19 RENT
10468.9518.950approved1-Feb-19 RENT
1010512520draft4-Feb-19 BK

 

If I take the rent roll for this contract 70_M_05.01, it will give me the rent 568.9 but If I need the rent roll in jan 2019 or in any past date then the rent should show 468.9 as you can see in the old_value of rent_modification table. I also have to have include certain criteria like state = "approved" and Kind = "RENT".

 

 

@Ashish_Mathur @Greg_Deckler  @Zubair_Muhammad 

 

Please Help!!!!!

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

Why should the rent for Jan 2019 be 468.9?  In that row, i do not see the date of Jan 2019 at all.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur . Since the rent increment was happened on 1st Feb 2019 as you see in the rent_modification table. So if I need the rent roll for Jan it should be the previous rent before the increment which is 468.9 in the old_value column. 

LivioLanzo
Solution Sage
Solution Sage

Hi @Anonymous 

 

I see something strange in your second table, should not the second row have an end date? Should not the 'start_date' be different between the first row and the second row? 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

Hi @LivioLanzo ,  It's correct. Somtimes because of some faulty entries we have this kind of data in the db. We don't have end_date for RENT increase because it's a one time increment. End_Date is for other kind of Rent Increase/Decrease where we do certain amount increment/decrement each month for a period of time. For eg. Rent reduction because of something broke in the apartment then we give tenants a discount on rent for few months.

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.