Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jwessel
Helper II
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.  

 

jwessel_0-1657902357381.png

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
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.

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

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

Output:

vjianbolimsft_0-1658293278672.png

 

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

 

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

Output:

vjianbolimsft_1-1658293278678.png

 

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.

View solution in original post

4 REPLIES 4
jwessel
Helper II
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 !!

jwessel
Helper II
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.

v-jianboli-msft
Community Support
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.

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

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

Output:

vjianbolimsft_0-1658293278672.png

 

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

 

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

Output:

vjianbolimsft_1-1658293278678.png

 

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.

evandrocunico
Resolver III
Resolver III

Hello!!!

 

Try check the same value in distinct days.

 

 

evandrocunico_0-1657913592074.png

 

Best regards.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.