Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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.
Solved! Go to Solution.
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.
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 !!
Thank you immensely for that information. I will check the data. Technically, a single case (case #) should not exist on two separate days/dates.
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.
Hello!!!
Try check the same value in distinct days.
Best regards.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
89 | |
82 | |
76 | |
64 |
User | Count |
---|---|
142 | |
111 | |
108 | |
99 | |
95 |