cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## 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 having is that when I manually sum the values on each day's bar, it does NOT total up to the value that is on the card.  For example, the columns manually totaled up for May come to a value of 2579.  However, the Card value shows 2573.  I cannot see that I have anything incorrect.  Does anyone have any ideas?  I have included a picture below.  I also share a link to the .pbix file here.

1 ACCEPTED SOLUTION
Community Support

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.

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.

4 REPLIES 4
Helper II

Again, my appreciation for the input.  It turns out that there are some Case #s which are present in my data on multiple days.  This was not expected and exposes a potential anomaly in our system.  Thanks !!

Helper II

Thank you immensely for that information.  I will check the data.  Technically, a single case (case #) should not exist on two separate days/dates.

Community Support

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.

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.

Resolver III

Hello!!!

Try check the same value in distinct days.

Best regards.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors