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
Gruja
New Member

Link table data with measures data and display in a visual

I’m working on a Power BI report and need assistance with combining forecasted and actual space data, while ensuring the ability to filter the data by Kostenstelle (department). Below is my data model setup and the approach I’m using:

Data Model:

I have a few key tables in my model:

    • Kostenstelle (group identifier)
    • Subdepartment
    • Department

      dimNutzerstructure (dimension table containing user categories):

Gruja_0-1736414541828.png

Example entries:

KostenstelleSubdepartmentDepartment
021102Financial_1Banking
021103Financial_2Banking
011112PersonalHR

 

2. ExportRDB (room data):

  • RoomID
  • Kostenstelle
  • Fläche in m² (area)
  • DIN277-1 (room type: e.g., NUF2 for office, NUF4 for storage)

Example entries:

RoomIDKostenstelleFläche in m² (area)DIN277-1 (type)
102110210NUF2
202110220NUF4
301111215NUF2

 

3. factPersonaltapete (user data):

  • Kostenstelle
  • Name
  • Department

Example entries:

KostenstelleNameDepartment
021102John DoeBanking
011112Max MustermannHR

Measures:

I am using the following measures to calculate space needs for each user category:

  1. Bürobedarf (forecasted office space):

 

Bürobedarf = 
SUMX(
    VALUES('factPersonaltapete'[MA-Kategorie]), 
    [Anzahl Angestellte] * 
    LOOKUPVALUE(
        'Bueroflaechenrichtwerte'[Büro - Richtwert, m²],
        'Bueroflaechenrichtwerte'[Dienstbezeichnung], 
        'factPersonaltapete'[MA-Kategorie]
    )
)

 

2. Anzahl Angestellte (number of employees):

 

Anzahl Angestellte = COUNTROWS('factPersonaltapete')

 

3. Lagerbedarf (forecasted storage space):

 

Lagerbedarf = [Bürobedarf] * 0.05

 

To get the actual amount of office and storage space, I calculate the sum of the Fläche in m² column from the ExportRDB table, categorized by the DIN277-1 column (with values NUF2 for office space and NUF4 for storage space).

Approach:

I created a ComparisonTable using UNION to combine forecasted and actual space data:

 

ComparisonTable = 
UNION(
    ROW("Category", "Office Space", "Forecasted", [Bürobedarf], "Actual", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1] = "NUF2"), 'Export RDB'[Raum - Fläche in m²])),
    ROW("Category", "Storage Space", "Forecasted", [Lagerbedarf], "Actual", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1]  = "NUF4"),'Export RDB'[Raum - Fläche in m²])),
    ROW("Category", "Laboratory Space", "Forecasted", [Gesamt Laborbedarf], "Actual", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1]= "NUF3"), 'Export RDB'[Raum - Fläche in m²])
))

 

Result

Gruja_1-1736414885169.png

Issue:

I am unable to filter this visual with the Kostenstelle column to display both the used and forecasted space for each department.

Question:

  1. Is the approach I’m using reasonable, or am I missing something in my logic?
  2. How can I combine the data from these measures with the data from the ExportRDB table, while still enabling filtering by Kostenstelle (department) in my visual?
0 REPLIES 0

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!

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.