Forum Discussion
Fragmaticx
11 months agoFrequent Visitor
CalculationGroups - switch between dates
Hi I have a model where I use calculaton groups to switch between dates. Lets say its a Order Date and Delivery Date - and I want to make a calculation based of the 2 dates. I think i ...
- 11 months ago
Hi Fragmaticx please try this
Lastmile Cost - Different Period =VAR CurrentCalcItem = SELECTEDVALUE ( 'DateToUse'[Calculation group column] )RETURNCALCULATE (SUM ( BaseData[AmountDKK] ),BaseData[Type] = 2,BaseData[TransportType] = 1,SWITCH (CurrentCalcItem,"OperationalPeriod", BaseData[ShipmentPeriod] <> BaseData[OperationalPeriod],"ShipmentPeriod", BaseData[OperationalPeriod] <> BaseData[ShipmentPeriod]))
v-hashadapu
11 months agoCommunity Support
Hi Fragmaticx , Thank you for reaching out to the Microsoft Community Forum.
We find the answer shared by techies is appropriate. Can you please confirm if the solution worked for you. It will help others with similar issues find the answer easily.
Thank you techies for your valuable response.