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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MikDumb
Regular Visitor

Creating New Column in Data Set: Commercial Real Estate

Hello - I am creating a new report in PowerBi to try and capture the amount of time it takes my team to lease and build out a commerical space.  Eventually, I will want to filter this list into two buckets, if the space ever had a tenant in it or if the space was being re-tenanted.  

 

I am trying to write a new column that will determine if the space is being re-tenanted, and I think the best way to solve for this is to review the SpaceID (my unique identifier for each leasable space) and determine if that SpaceID shows up in another row in the data.  If it does show up in the data set multiple times, the first lease date would be the initial buildout, and every other occurance would be retenanting.  Below is a sample of my data.  The space ID 32142901 with a lease date of 8/28/2020 should show as a retenanting and 32142901 with a lease date of 3/15/18 should be intial buildout.

 

MikDumb_0-1657658768522.png

Thanks for the help!

 

 

1 ACCEPTED SOLUTION

@MikDumb 

pls try this

Column = 
VAR _min=CALCULATE(min('Table'[Leasing Date]),ALLEXCEPT('Table','Table'[SpaceID]))
VAR _max=CALCULATE(max('Table'[Leasing Date]),ALLEXCEPT('Table','Table'[SpaceID]))
return if('Table'[Leasing Date]=_min,"Initial Buildout",if('Table'[Leasing Date]=_max,"Retananting"))

1.PNG





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

Proud to be a Super User!




View solution in original post

7 REPLIES 7
MikDumb
Regular Visitor

MikDumb_0-1657726018566.png

The Buildout Type is the output column I would like to replicate in PowerBI.

@MikDumb 

pls try this

Column = 
VAR _min=CALCULATE(min('Table'[Leasing Date]),ALLEXCEPT('Table','Table'[SpaceID]))
VAR _max=CALCULATE(max('Table'[Leasing Date]),ALLEXCEPT('Table','Table'[SpaceID]))
return if('Table'[Leasing Date]=_min,"Initial Buildout",if('Table'[Leasing Date]=_max,"Retananting"))

1.PNG





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

Proud to be a Super User!




That was it!  Thank you!!!!

you are welcome





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

Proud to be a Super User!




MikDumb
Regular Visitor

Where I'm getting hung up is that the expected output is dependent upone other rows within the table.  Starting at the top of the sampled data set, the expected output is as follows:

  • Space ID 32142501 - "Initial Buildout" - Logic: This is the only time this Space ID occurs in the table; therefore, it was the initial buildout of the space
  • Space ID 32142901 (8/28/20 Lease Date) - "Retenanting" - Logic: This Space ID occurs multiple times; however, the lease date listed is not the earliest Lease ID for this Space ID.  Therefore, this was a retenanting of the space
  • Space ID 32142901 (3/15/18 Lease Date) - "Initial Buildout" - Logic: This Space ID occurs multiple times; however, the lease date listed is the earliest Lease ID for this Space ID.  Therefore, this was the initial buildout of the space
  • All other Space IDs only have one occurance in the table; therefore they are all initial buildouts. 

 Hopefully that clarifies what I'm trying to solve for.

 

Thanks for the help!

@MikDumb 

could you pls show the expected output in excel and provide the screenshot?





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

Proud to be a Super User!




ryan_mayu
Super User
Super User

@MikDumb 

what's the expected output?

So the logic is mininum lease date and maximum tenant opening?

maybe try 

=min([table[lease date])

=max(table(tenant opening])





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.