Skip to main content
cancel
Showing results for 
Search instead 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

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
Europe Fabric Conference

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 Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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