Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |