The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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]))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
16 | |
13 |
User | Count |
---|---|
39 | |
38 | |
23 | |
21 | |
20 |