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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
luzrueda
Frequent Visitor

How can I filter a measure using a field that only exists in one table

Guten Tag zusammen,

 

Ich arbeite an einem Power BI-Modell mit dem Ziel, die verfügbaren Stunden pro Arbeitskraft und Monat zu berechnen. Ich habe drei Tabellen:

  1. Faktura-Tabelle:
    Diese Tabelle enthält die tatsächlichen Arbeitstage (1 Tag = 8 Stunden) pro Mitarbeiter. Darauf aufbauend habe ich ein Maß namens "Faktura" erstellt, das die Arbeitsstunden pro Monat und Person summiert.

    Beispiel:

     
    Bezeichnung | Arbeitstage Carlos | 02.04.2025 Carlos | 03.03.2025 Lara | 05.04.2024 Lara | 07.03.2025 Lara | 09.03.2025

     

     
    1. Planstunden Tabelle:
      Diese Tabelle enthält die geplanten Arbeitszeiten und ein Feld "Status der Bestätigung".

      Beispiel:

       

      Bezeichnung | Tage planen | Stunden planen | Status der Bestätigung Carlos | 02.04.2025 | 3 | 100% Lara | Stand: 05.04.2024 | Nr. 5 | 50% Lara | 07.03.2025 | 6 | 80%

       

       
      1. Tabelle der Urlaubstage:
        Diese Tabelle enthält die Urlaubstage (1 Urlaubstag = 8 Stunden).

        Beispiel:

         

        Bezeichnung | Urlaubstage Carlos | 03.03.2025 Lara | 05.04.2024 Lara | 09.03.2025
         

        Alle drei Tabellen sind über eine Dimensionstabelle Name und eine Dimensionstabelle Date verbunden.

        Mein Ziel:

        Ich möchte für jede Arbeitskraft und jeden Monat eine Kennzahl wie folgt berechnen:

        Verfügbare Stunden = Faktura-Stunden – Urlaubsstunden – Geplante Stunden (gefiltert nach Bestätigungsstatus)

        Das Problem:
        Das Feld "Status der Rückmeldung" existiert nur in der Tabelle Planstunden. Wenn ich also einen Datenschnitt oder Filter auf "Status der Bestätigung" anwende, wirkt sich dies nicht auf das endgültige Measure "Verfügbare Stunden" aus, da dieser Filter nicht auf Faktura- oder Urlaubsdaten angewendet wird.

        Frage:

        Wie kann ich den Filter "Status der Rückmeldung" auf die vollständige Berechnung der verfügbaren Stunden auswirken, obwohl dieses Feld nur in der Tabelle vorhanden ist? Stunden planen

        Ich habe bereits versucht, eine getrennte Statustabelle zu erstellen und zu verwenden, aber ich habe immer noch Schwierigkeiten, den Filter in allen Szenarien ordnungsgemäß zu verwenden.

        Alle Ideen oder Best Practices wären sehr willkommen!

1 ACCEPTED SOLUTION

Hi @luzrueda 

Thanks for sharing the update glad to hear you were able to resolve the issue filter related to context of the new column under Billing and Absenteeism, then it ignores the selection for these two columns and calculates with the sum.

It’s great that you shared your approach with the community, as it could help others facing a similar challenge.

 

Please feel free to continue using the Fabric Community for any future questions or discussions.

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Das ist zu detailliert. Es geht besser mit Beispieldaten.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Hi @luzrueda 

I wanted to follow up on your question regarding  Power BI model with the goal of calculating the available hours per worker per month. I have three tables.

 

To assist you more effectively, could you please provide the sample data and the expected output? This will help us understand your requirements better and offer a more targeted solution.

Thank you for your cooperation, and I look forward to your response!

 

 Hallo @v-aatheeque

Ich habe das Problem gelöst: man müsste den Filterkontext der neuen Spalte unter Faktura und Abwesendheit löschen, dann ignoriert er für diese zwei Spalten die Auswahl und rechnet mit der Summ. 

all() ignoriert immer die ausgewählte Spalte. Es gibt noch allexept() das ignoriert alle außer der ausgewählten Spalte. 

 

Hi @luzrueda 

Thanks for sharing the update glad to hear you were able to resolve the issue filter related to context of the new column under Billing and Absenteeism, then it ignores the selection for these two columns and calculates with the sum.

It’s great that you shared your approach with the community, as it could help others facing a similar challenge.

 

Please feel free to continue using the Fabric Community for any future questions or discussions.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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