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
_chris_
Helper III
Helper III

Problem with Measure

Hi, I have a simple question I am struggling with:
 
I have two tables which have proper relationship. One is for time booking, the other is for the headers of the time bookings (ProjectPositions).
 
I am of the opinion, I did a proper measure:
 
PT = CALCULATE(SUMX(employeeHrs, employeeHrs[Hrs]/8), dimProjects[InvoicingKey]="nA", employeeHrs[toInvoice]=TRUE)
 
However, when I add the field Abrechnung (=InvoicingKey) to my table, the one ProjektPosId gets repeated with multiple invoicing keys while there is only one row in the database.
 
_chris__0-1675104441467.png_chris__1-1675104493548.png

It would be really nice if someone could help and explain to me what I am doing wrong.

 

Thx Christian

1 ACCEPTED SOLUTION
marcelsmaglhaes
Super User
Super User

Hey @_chris_ !

Try the measure below.

PT = 

CALCULATE(

SUMX(employeeHrsemployeeHrs[Hrs]/8), 
FILTER(dimProjects, dimProjects[InvoicingKey]="nA"),
FILTER( employeeHrs, employeeHrs
[toInvoice]=TRUE)
)

If this helps, please mark this question as solved to help people find quickly in our community!

Regards,
Marcel


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



View solution in original post

2 REPLIES 2
_chris_
Helper III
Helper III

Hi Marcel,

 

thanks a lot for your quick response. It works fine. I guess I have to go back and do my homeworks to understand why my solution did not work.

 

Thanks again!

 

Christian

marcelsmaglhaes
Super User
Super User

Hey @_chris_ !

Try the measure below.

PT = 

CALCULATE(

SUMX(employeeHrsemployeeHrs[Hrs]/8), 
FILTER(dimProjects, dimProjects[InvoicingKey]="nA"),
FILTER( employeeHrs, employeeHrs
[toInvoice]=TRUE)
)

If this helps, please mark this question as solved to help people find quickly in our community!

Regards,
Marcel


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



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.