Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi, I'm trying to build a measure (called 'Earned Hours') that multiplies 2 columns from related tables - quantities and standard hours per product.
My data model looks like this:
My current measure calculates correct results per row, but does not give me correct total:
Earned Hours = SUM('Fact Production'[Quantity])*SUM('Fact Std Hrs'[Std Hrs])
The correct number should be:
I have simplified my original post to make this easier to understand.
Solved! Go to Solution.
@Krzysztof_Hyla try below measure to get correct total
Measure =
VAR _product = SUM(factProduction[Quantity])*SUM(factStdHours[StdHours])
VAR _summarize = SUMMARIZE(dimProduct,dimProduct[Product],"total",SUM(factProduction[Quantity])*SUM(factStdHours[StdHours]))
RETURN IF(HASONEVALUE(dimProduct[Product]),_product,SUMX(_summarize,[total]))
@Krzysztof_Hyla try below measure to get correct total
Measure =
VAR _product = SUM(factProduction[Quantity])*SUM(factStdHours[StdHours])
VAR _summarize = SUMMARIZE(dimProduct,dimProduct[Product],"total",SUM(factProduction[Quantity])*SUM(factStdHours[StdHours]))
RETURN IF(HASONEVALUE(dimProduct[Product]),_product,SUMX(_summarize,[total]))
User | Count |
---|---|
13 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
29 | |
17 | |
14 | |
13 | |
11 |