Forum Discussion
Anonymous
5 years agoNot applicable
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...
- Anonymous5 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
AlB
Community Champion
5 years agoHi Anonymous
I'm not sure I follow. Can you not simply create a relationship (active or inactive to activated through USERELATIONSHIP) between your date table and the new date column you've created (Datum Schiechbasierte Berechnung)??
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Anonymous
5 years agoNot applicable
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