Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |