Forum Discussion

dd999's avatar
dd999
Icon for Advocate I rankAdvocate I
6 months ago
Solved

Measure either displays all same number or incorrect

in table Measurements Count Record ID = // COUNT used as same client ID/Record can exist in multiple progams CALCULATE( COUNT('2025-2026'[Value]), FILTER( '2025-2026', CONTAINSSTRING('2025-202...
  • Anonymous's avatar
    Anonymous
    6 months ago

    Hi dd999 ,

    I replicated your scenario using a small sample model to verify whether the behavior could be reproduced. In this simplified setup, I used the following measure, which evaluates correctly both with and without the Status field in the matrix:

    Count Record ID =
    CALCULATE(
    COUNT('2025-2026'[Value]),
    FILTER(
    '2025-2026',
    CONTAINSSTRING('2025-2026'[Criterion], "Record ID")
    )
    )

    With this measure, the totals and row-level breakdown display as expected, and there is no repetition of values across rows. This indicates that the DAX logic is functioning as intended.

    If your actual report displays repeated values or incorrect totals when additional fields (such as Status or period fields) are included, it is likely a model related issue rather than a problem with the measure. Please ensure that the Team-Program column is unique on the dimension side (example in  - the Audit_Checklist table), that the relationship is set as a proper 1:* relationship, and that the cross-filter direction is suitable. Also, check for duplicate keys or grain mismatches between the tables. Once the model structure and relationships are configured correctly, the measure should evaluate properly within the visual context.

    Find the attached .pbix file for your Reference.

    Thank you.