Hi friends! I have a case in Power BI, that perhaps one of you has happened, I need that in the table type visualization the distitutive count is totaled by ID, the general total is calculated well, but when I add any of the fields of the table as client's office, the totals for sex, office, attention make a distinctive sum different from the total. Example with filter in year 2021 and semester 2, with the fields sex, office, attention, when doing the summation by category it differs from the distinctive total. unique = DISTINCTCOUNT ('TABLE' [ID]) There is also a field of dates that can be repeated in many records.
I ran the example of @Syndicate_Admin as is and I have the required result, but now I must apply the same for the same column but with a different row level. Example
However the formula applied adds me correctly in the first level but in the 2nd level of row it is distorted.
Hi @raulopez ,
It's hard to reproduce the scenario, can you share some sample data in text format instead of screenshot and share the formula you are using?
I attach the PBIX and the dataset, you will be able to observe the difference of the summations with the distittive total.
DISTINCTCOUNT returns the count of unique values in the filter context. For the total, you are seeing the count of unique values overall (taking into account any slicers applied). What is it you hope to see?
My requirement is that the individual sums of each table correspond to the total, as can be seen in each table the total is 5356 when adding Female + Male, FILE + LIBRARY + WAREHOUSE + GYM or Advisory + claim + complain + conference + etc. the total does not coincide with the summations. and then if 5356 is given as a distinctive result in general, the sum should coincide with that total.
Taking this simple model as an example:
With these two measures...
Distincount Version = DISTINCTCOUNT ( Sales[Version] )
Distinctcount version SUMX = SUMX ( SUMMARIZE ( 'DIM Product', 'DIM Product'[Product], "@count", DISTINCTCOUNT ( Sales[Version] ) ), [@count] )
you get this:
I have only a table , without relationships.
If you agree, I will share a pbix and the sources with the expected result, it seems that when removing duplicates from power bi, it is not applying it in the correct way.
I do not see any mistake anywhere. Even if you write this measure
=Measure = DISTINCTCOUNT(Example_catered[Cod])
you get the result as 5,356.
Ashish. It is that the total is not incorrect, that the measurement is correct, it is about the individual values when they are added, they must coincide with the same number of the total. Try adding them. the problem is applying the distinctive count to the dataset. I need to find the solution to get the distinctive values without having to do it separately per semester.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.