cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Matrix Total incorrect - Need Help

Hey guys,

LaZZaNoVa61_0-1675760931710.png


I have this Matrix calculating the totals.
I use the following formula to calculate my values: 

Polissen = CALCULATE(DISTINCTCOUNT('Union Maia Data'[cldeeln.Naw.Naw-Polisnummer]))


Any idea why the totals are incorrect?

With kind regards,

Lazzanova
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

it is because one item "cldeeln.Naw.Naw-Polisnummer" could present at multiple categories. 

If you change DISTINCTCOUNT to COUNT, the total will be correct, even it might not be your expected result. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Another example:

LaZZaNoVa61_0-1675761318004.png

 



FreemanZ
Super User
Super User

hi @Anonymous 

it is because one item "cldeeln.Naw.Naw-Polisnummer" could present at multiple categories. 

If you change DISTINCTCOUNT to COUNT, the total will be correct, even it might not be your expected result. 

Anonymous
Not applicable

Yes, that did the trick.

However I have two visuals here. One showing the correct amount of Totals, the other does not:

Correct Totals:

LaZZaNoVa61_0-1675762674559.png



Incorrect Total:

LaZZaNoVa61_1-1675762731177.png


The measure used at the second matrix for Type E-mail is as follows:

Type E-mail =
SWITCH(TRUE(),
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"onbekend"),"Onbekend",
'Maia Data'[maia.Persoon.e-mail] = BLANK (), "onbekend",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"sbz"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"mailstreet"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"menzis"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"ntac"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"onderling"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"agriver"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"donatus"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"ovm"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"zlm"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"cz.nl"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"dsw.nl"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"zorgenzekerheid"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"gezondmetsalut"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"sgv"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"jtv-zoetermeer"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"stcdeventer"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"star-shl"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"lalarsk"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"medicinfo"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"unive"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"vanderdussen"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"vecozo"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"vektis"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"vgz.nl"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"zorg"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"zn.nl"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"schuldenlab"),"Zakelijk",
CONTAINSSTRING('Maia Data'[maia.Persoon.e-mail],"owmachterhoek.nl"),"Zakelijk",
"Privé")


Does this have to do with the measure? Or something else?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors