Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, I am trying to calculate the following:
Measure
DistinctQuantity = CALCULATE(DISTINCTcount([Id]),[IsActive]="Active")
Measure
TotalPrice= DistinctQuantity*sum(Price)
Price DistinctQuantity TotalPrice
A 10 1 10
B 0 100 0
C 0 899 0
Total 10 1000 10000
Solved! Go to Solution.
In this scenario, you TotalPrice should be eavaluated on each row level, so you should use SUMX() function.
Total Price = SUMX(Table3,Table3[Price]*[Total Quantity])
Regards,
In this scenario, you TotalPrice should be eavaluated on each row level, so you should use SUMX() function.
Total Price = SUMX(Table3,Table3[Price]*[Total Quantity])
Regards,
In general, consider that the total line is really the measure evaluated in the context of ALL. You can add a if HASONEFILTER to your measure to calculate it for rows with the alternative being your calculation for your total row. I may have those reversed. It's early.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.