Forum Discussion
Trouble aggregating Measure results in a Table
- Anonymous1 year ago
Hi htbull_
Please try this
_ClaimsOpened :=
CALCULATE(
COUNTROWS(ClaimInfoHistory),
FILTER(
ClaimInfoHistory,
[IsLatestClaimFlag] = 1 &&
ClaimInfoHistory[StatusID] = 352
),
Ensure calendar relationship is used correctly
USERELATIONSHIP(ClaimInfoHistory[SaveDate], Calendar_History[Date])
)
_TotalClaimsOpened :=
CALCULATE(
COUNTROWS(ClaimInfoHistory),
FILTER(
ALL(ClaimInfoHistory),
[IsLatestClaimFlag] = 1 &&
ClaimInfoHistory[StatusID] = 352
)
)
Hi htbull_ ,
Thanks for posting in Microsoft Fabric Community.
Just checking in to see if you query is resolved.
The approach suggested by Anonymous is correct. By having _ClaimsOpened respect the calendar relationship and flag logic, and _TotalClaimsOpened use ALL to ignore row context, the calculation ensures that the row-level results and the total are both evaluated correctly.
If you still need assistance, please let us know.
Thank you.