Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 |
---|---|
20 | |
14 | |
11 | |
8 | |
6 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |