Forum Discussion
Finding datetime diff by start and min temp value timestamp in groups
Hi,
I would like to have measure that show me the time between timestamps of start measuring value and achieving the minimal value. It works properly on level of ID_key but on the highest level of agreggation I would like to have sum of time of every unit.
This my measure
Czas wychlodzenia TOTAL =
vAR P =min(V_PBI_POMIAR_IB[ROW_KEY])
var tab = cALCULATETABLE(ADDCOLUMNS (
GROUPBY ( V_PBI_POMIAR_IB; V_PBI_POMIAR_IB[ID_KEY];V_PBI_POMIAR_IB[IB] );
"ZAŁADUNKE SL"; CALCULATE (
min( V_PBI_POMIAR_IB[ROW_KEY] );
FILTER ( WMIAR_ZDARZENIE; WMIAR_ZDARZENIE[ID] = 1 )
);
"UZYSKANIE MAKS";
CALCULATE (
MIN ( V_PBI_POMIAR_IB[ROW_KEY] );
FILTER (
ALLEXCEPT(V_PBI_POMIAR_IB;V_PBI_POMIAR_IB[ID_KEY]);
V_PBI_POMIAR_IB[VALUE] = MIN ( V_PBI_POMIAR_IB[VALUE] )
)
);
))
return
sumx(tab;DATEDIFF([ZAŁADUNKE SL];[UZYSKANIE MAKS];HOUR))
Please help me finding solution
1 Reply
- AnonymousNot applicable
Hi patipati ,
Could you please share some sample data and expected result to me if you don't have any Confidential Information.
If so, please upload your files to One Drive and share the link here.
Best Regards,
Jay