Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 need something like, if selectedmeasure is OperationalDate then
Lastmile Cost - Different Period =
CALCULATE(
SUMX(BaseData, BaseData[AmountDKK]),
FILTER(
BaseData,
BaseData[Type] = 2 &&
BaseData[TransportType] = 1 &&
BaseData[ShipmentPeriod] <> BaseData[OperationalPeriod]
)
)
but I dont know how to do it?
Hi everybody,
This is a small sample set.
I have a calculation group: DateToUse
Item 1:
SELECTEDMEASURE ()
Item 2:
CALCULATE ( SELECTEDMEASURE (), USERELATIONSHIP ( BaseData[ShipmentPeriod], 'DateTable'[Date] ) )
OperationalPeriod | ShipmentPeriod | AmountDKK | Type | Customer | TransportType |
01-08-2025 | 01-08-2025 | 100 | 2 | Dennis | 1 |
01-07-2025 | 01-08-2025 | 150 | 2 | Dennis | 1 |
Lastmile Cost - Different Period =
CALCULATE(
SUMX(
BaseData,
BaseData[AmountDKK]
),
FILTER(
BaseData,
BaseData[Type] = 2 &&
BaseData[TransportType] = 1 &&
BaseData[ShipmentPeriod] <> BaseData[OperationalPeriod]
)
)
I expect it to show if ShipmentPeriod is selected then it should be 0 since both lines are within that period, and if OperationalPeriod is selected it should show 150, since they are 01-07-2025.
I appriciate your help,
Hi @Fragmaticx please try this
Hi @Fragmaticx As i understand, you can try using ISSELECTEDMEASURE where you want change depending on measures shipment based, operational based
Please share sample datasets to test
I am unsure as to what you are trying to do
Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.
Need help uploading data? click here
Want faster answers? click here
User | Count |
---|---|
11 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
18 | |
16 | |
10 | |
7 |