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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
helpdesk22
New Member

Real Estate Data - Filter by Time and Location

Hello everybody,

I want to set up a report for occupancy tracking in real estate. Here ist the sample Power BI file: https://we.tl/t-EFqvZbbnlW

 

There are two data sets in the sample file, one for supply and one for demand.

 

In the supply sheet the ID is a unique identifier, on the demand side each location can occur several times.

 

The data sets are connected by two tables, one for geography and one for time. Geography and supply should be connected by an 1:1 relation but I cannot select this.

 

Please see the reports in the sample file. I can calculate the number of free workstations - using demand and supply datasets - with correct results and also show it in a graph in the third sheet. But as soon as I want to filter the measure "free workstations" by location or department I get wrong values.

 

Would be great if you have a solution for me

 

Thanks in advance!

 

2 REPLIES 2
lbendlin
Super User
Super User

 

Geography and supply should be connected by an 1:1 relation but I cannot select this.

 

Your supply table also contains the year. Your data model is correct as it is.

lbendlin_0-1669483745219.png

Note the blue i  warning.

 

lbendlin_1-1669483838470.png

You could change the measure to 

free workstations = max(0,sum(supply[workstations])-sum(demand[pax]))

 

 

Thank you very much for your advice!

 

Now I understand that the tree map only shows positive values.

 

So what I did now is to create two measures one for missing workspaces and one for free workspaces. I did not use the max function because then the negative values are cut although they are needed in the model.

 

There was an additional mistake. In the first version of the model the treemap charts did not make use of the geography table.

 

Obviously you always have to use the help tables for time and geography, otherwise you will receive wrong results.

 

You find the corrected model here: https://we.tl/t-Tdhqu97j7d

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.