Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bokazoit
Continued Contributor
Continued Contributor

Why is my table aggregates incorrect but the total is correct?

My datamodel:

 

Bokazoit_0-1650521534356.png

The active join is between DimDato - my date table and the coloumn [Forventet afsluttet Dato]

 

My measure:

 

 

 

 

Count = 

VAR MinDate = CALCULATE(MIN(DimDato[Dato]),ALLSELECTED(DimDato[Dato]))

RETURN

CALCULATE(
        DISTINCTCOUNT(FactArvesager[ArvesagsKey]),
        FactArvesager[Bostarts Dato] < MinDate &&
    (FactArvesager[Realiseretarv Dato] = BLANK() || FactArvesager[Realiseretarv Dato] >= MinDate)
    )

 

 

 

Here is the odd part. When I build my measure everything is fine. it counts correctly and the total is correct

Bokazoit_1-1650521863492.png

 

But if I add a date from my Date dimension (DimDato) things start to look weird:

 

Bokazoit_2-1650522007906.png

 

For some reason it adds the BoNummer (MemberIds) for 62026,62027 & 62028

 

But the total is correct, and according to my measure, they should not be counted. If I add the MinDate to see what it calculates it does though make sense:

 

Bokazoit_3-1650522866593.png

But the purpose of adding the variable to  my measure, this part:

 

VAR MinDate = CALCULATE(MIN(DimDato[Dato]),ALLSELECTED(DimDato[Dato]))

 

is to get the minmum date selected in the date slicer, but that seems not to be the case.

 

I simply can not figure it out. The key is the date variable that is suppose to be that same value for every row but apparently is not

2 REPLIES 2
DataInsights
Super User
Super User

@Bokazoit,

 

Try changing the four bidirectional relationships to unidirectional. Bidirectional relationships can cause numerous isues.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Sorry but it is a questionary, so that is actually a model I got in here and will not work without

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors