---
type: work
area: work
status: active
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - work
---
I run a DAX query against power bi semantic model:
first i was running it for every half of month and after getting results of both halves in excel files i combine those 2 files in 1 file then i do sum for the column amountIneuro i get a value 
example : october 2024 for both half from 1-15 and from 16 - 31
```
DEFINE
    VAR __DS0FilterTable =
        FILTER (
            KEEPFILTERS ( VALUES ( 'Billing Cases'[ProcessingDate] ) ),
            AND (
                'Billing Cases'[ProcessingDate] >= DATE ( {year}, {month}, {day} ),
                'Billing Cases'[ProcessingDate] <= DATE ( {year}, {month}, {day} )
            )
        )
    VAR __DS0Core =
        FILTER (
            KEEPFILTERS (
                SUMMARIZECOLUMNS (
                    'Transport Orders'[ChargedLocationName],
                    'Transport Orders'[ServiceLevel],
                    'Billing Cases'[ProcessingDate],
                    'Billing Cases - Costs'[BillIdExternalDate],
                    'Billing Cases - Costs'[CostType],
                    'Billing Cases'[LoadId],
                    'Billing Cases'[TransportOrderId],
                    'Billing Cases'[SteeringPartnerId],
                    'Billing Cases'[SteeringPartnerName],
                    'Billing Cases'[BillingCaseId],
                    'Transport Orders'[BusinessCase],
                    'Transport Orders'[SupplierName],
                    'Billing Cases'[BillingPartnerName],
                    'Transport Orders'[PickupLocationID],
                    'Transport Orders'[PickupLocationCity],
                    'Transport Orders'[PickupLocationZipCode],
                    'Transport Orders'[PickupLocationCountry],
                    'Transport Orders'[ChargedLocationId],
                    'Transport Orders'[Scope],
                    'Transport Orders'[PlantName],
                    'Transport Orders'[DeliveryLocationCity],
                    'Transport Orders'[DeliveryLocationID],
                    'Transport Orders'[DeliveryLocationZipCode],
                    'Transport Orders'[DeliveryLocationCountry],
                    'Billing Cases - Costs'[BillIdExternal],
                    'Transport Orders'[Department Description],
                    'Loads'[SourcingRegion],
                    'Loads'[TransportMode],
                    'Billing Cases'[CodeI],
                    'Billing Cases'[CostCenter],
                    'Billing Cases'[Gl Account],
                    'Billing Cases'[Indicator],
                    'Rating Units'[ProcessingDate],
                    __DS0FilterTable,
                    "SumAmountInEuro", CALCULATE ( SUM ( 'Billing Cases - Costs'[AmountInEuro] ) ),
                    "MaxCurrentStatus", CALCULATE ( MAX ( 'Billing Cases - Costs Status (selection)'[CurrentStatus] ) )
                )
            ),
            [SumAmountInEuro] <> 0
        )

EVALUATE
__DS0Core
```
now i changed the query to get the data for the total month for example from 1 otober >= and < 1 November. when I sum the total of column amountInEuro i get the same result as 2 halfs.
But the problem is that i found that number of rows between 2 files is diffrent always separed approch has more row number that hen getting the total month.

Relation ship between tables
![[img-20250826-131835-1bbd15e3.png]]
help me get an explanation to this because i don't understand why that is happening