Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Associate a value to a specific date

Hi everyone,

 

Please I need your help,

I'm calculating the time past by day, on this example the FRE_NextTime finished on the next day, then i calculate MINUIT that mean from FRE_Time to midnight, 115.47 minuts for February 8, and did the same for the next day of February 9, MATIN is the rest from FRE_NextTime back to midnight, the MATIN, 363.73 min belongs to the next day February 9.

 

I need to associate the value of MATIN to the right date, in this case FRE_NextTime - Copier.

I tried this:

 

TIME = IF(TBL_RESULTS[FRE_Time - LIAISON]<>TBL_RESULTS[FRE_NextTime - Copier];CALCULATE(SUM(TBL_RESULTS[MATIN]);NEXTDAY(TBL_RESULTS[FRE_Time - LIAISON])).

 

Thanks a lot,

7 Replies

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Community Support

    Hi,

     

    According to your description, i create a sample to test:

    Then try these two columns:

    MINUIT = DATEDIFF('Table'[FRE_Time],'Table'[FRE_Time-LIAISON]+TIME(0,0,0)+1,SECOND)/60
    MATIN = DATEDIFF('Table'[FRE_NextTime-Copier]+'Table'[FRE_NextTime],'Table'[FRE_NextTime-Copier]+TIME(0,0,0)+1,SECOND)/60

    The result shows:

    Here is my test pbix file:

    pbix 

    Hope this helps.

     

    Best Regards,

    Giotto Zhi

    • Anonymous's avatar
      Anonymous
      Not applicable

      But i still need to associate for example, the MATIN's value (1076,28) to the right date (February 9) when i filter by date.

       

       

      the problem here, is when I select a date ( February 😎 i have to see all the MINUIT's value and for  ( February 9) all the MATIN's value because of is after the midnight and it belong to the next day of 8.

      Thanks,

       

      • v-gizhi-msft's avatar
        v-gizhi-msft
        Community Support

        Hi,

         

        I am still confused about your requirement.

        Could you please explain more about your requirement and expected result for me to help you further.

        Thanks!

        Expect your reply!

         

        Best Regards,

        Giotto Zhi