Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
patipati
Frequent Visitor

Finding datetime diff by start and min temp value timestamp in groups

Przechwytywanie.PNGHi,

 

 

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 1
v-jayw-msft
Community Support
Community Support

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.