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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bokazoit
Responsive Resident
Responsive Resident

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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