Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculate SUM between two datetimes

Hello Everybody!   I need your input on an approach of mine. I have following table via direct query from a SQL database: The table is conneced to a simple date table, lowest granularity is...
  • Anonymous's avatar
    Anonymous
    5 years ago

    USERELATIONSHIP did the trick, I had to do some minor changes to my data model and it works now.

    Thanks a lot for the right prompt.

    My solution looks like this:

     

    FM SYS1 6-6 =
    CALCULATE(CALCULATE(SUMX('FM geliefert','FM geliefert'[Nettowert]),
    FILTER('FM geliefert',
    'FM geliefert'[KZ2]="A" ||
    'FM geliefert'[KZ2]="B" ||
    'FM geliefert'[KZ2]="C")),
    USERELATIONSHIP('01 Kalender'[Datum],'05 Schichtzeit Kalendar'[Datum Shift]))
     
    Cheers Rainy