Forum Discussion
Missing total distinguished count
My requirement is that the individual summaries of each table correspond to the total, as can be seen in each table the total is 5356 when adding Female+Male, FILE+BIBLIOTECA+BODEGA+GYM or Advisory+claim+complain+conference+etc. does not match the total with the summations. and so if it results in a distinctive result 5356 in general the sum should match that total.
Thank you!
Syndicate_Admin
That is the way it works 🙂
At the total level, it takes all the values and gets the DISINCTCOUNT. It does not add up the other "cells" .
If you want to get the desired results, you need to add each row as follows. I only did it for office, you will need to create for each category where you need DISTINCTCOUNT.
Measure =
IF(
ISINSCOPE( Example_catered[office]),
DISTINCTCOUNT(Example_catered[Cod]),
var __t = ADDCOLUMNS(ALLSELECTED(Example_catered[office]),"@dcount", CALCULATE(DISTINCTCOUNT(Example_catered[Cod]))) return
SUMX(__t,[@dcount])
)
- Syndicate_Admin5 years ago
Administrator
Yes, it is correct what you are asking me, but if I show a distinctive total result of 5356 which is the distinctive global, the sums of the offices, for example, open me up to 5356.
Because the reference value is that total, if the summation throws 5926 would be exceeding the actual value of the badge which is 5356, it is as if it counts more additional cells, it is loq eu I wish to avoid, otherwise without the distinctiveness and repeated values in the cells there are equalizations the sums. There is a date value for events in the main table, and dates may be repeated, that field type may increase or deter from the total, because dates do not behave as an ID.
- Fowmy5 years ago
Super User
Based on your requirement either you can go with the default calculation or follow the measure that I shared. It depends on how you want the results to be utilized and how it makes perfect sense 🙂
- Syndicate_Admin5 years ago
Administrator
Thank you very much for your support with the solution, but in both scenarios it is not a logical result, because the one I raised initially do not give the sums with the total, and with the calculation that you kindly shared me exceeds the total. ☹️
In turn, what I want to avoid is having to put a chart or sheet to part for each year-semester, that is not optimal in the visualization.