Forum Discussion

jwessel's avatar
jwessel
Icon for Helper II rankHelper II
4 years ago
Solved

Count differences between Total card and monthly vis

I have a clustered column chart with data count labels on each bar, representing count of "cases" each day of a month.  I also have a card which shows the total cases for that month.  The issue I am ...
  • v-jianboli-msft's avatar
    4 years ago

    Hi jwessel ,

     

    These results are logically correct. In the clustered column chart, each bar counts the distinct number of cases in that day. The card visual distinct count the total case. However just as evandrocunico  mentioned before, when you have the same case in different days, the sum value of each day's bar is different from total case number.

    I have created different measures to help you calculate, please try:

    Measure 1 = CALCULATE(DISTINCTCOUNT(CMS[Case #]),FILTER('Dates',[FYMonth]=MAX('Dates'[FYMonth])))

    Output:

     

    Measure 2 = CALCULATE(DISTINCTCOUNT(CMS[Case #]),FILTER('Dates',[FYMonth]=MAX('Dates'[FYMonth]) && [Day]=MAX('Dates'[Day])))

     

    Measure 3 = SUMX('Dates',[Measure 2])

    Output:

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.