Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

total in report not Adding all values in a table column

Hi All, I have a column in my report that shows how many inspections are completed this year, by location. I have a measure that counts the number of inspections completion for this year: Complet...
  • nilendraFabric's avatar
    1 year ago

    Hello Anonymous 

     

    looks like `DISTINCTCOUNT()` with `ALLEXCEPT()`, is behaving differently in totals.

    try this

     

    Completed_Inspections_This_Year =
    VAR CurrentYear = YEAR(TODAY())
    RETURN
    SUMX(
    VALUES('Asset_Inspections'[Loc]),
    VAR LocationCount = CALCULATE(
    DISTINCTCOUNT('Asset_Inspections'[Last inspection Date]),
    YEAR('Asset_Inspections'[Last inspection Date]) = CurrentYear
    )
    RETURN
    LocationCount
    )