Forum Discussion

Wicak's avatar
Wicak
Helper I
2 years ago

Get value based on Range date time

Hi all master,

i have data sample with date time 

and i have date time every 1 minute with parameter. 

so, how DAX for get data table A column sample with criteria table based on date time table B which is generating the result column table B? 

 

can you give me some insight About this?
Thank you for your attention

 

4 Replies

  • Where does the parameter column come into the story?  What is your logic for arriving at the result?

  • hi lbendlin thanks for reply. 

     

    column result Table B is column Sample Table A. so If datetame table A including in range datetime B then column result have a value sample Table A

     

    thanks

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

      Do not include sensitive information or anything not related to the issue or question.

      If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

      Please show the expected outcome based on the sample data you provided.

      Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

      • Wicak's avatar
        Wicak
        Helper I

        thanks for intruction,

         

        okay I will repeat the explanation

         

        i have Table A, output value machine flexible Date time  

        Date timeValue Machine
        27/12/2022 23:451
        27/12/2022 23:482
        27/12/2022 23:583
        28/12/2022 00:021
        28/01/2023 00:051
        28/01/2023 00:073
        28/01/2023 00:102
        28/01/2023 00:123

         

        and i have table B per minute, and i want combine Table A and B where range date time table A include in Table B the copy value in range 

        Example : 

        date time 27/12/2022 23:58 value machine is 3,

        then table B per minute copy value more than or equal date time

        27/12/2022 23:58 is 3

        27/12/2022 23:59 is 3

        27/12/2022 00:00 is 3

        until 28/12/2022 00:01 is 3

        for 28/12/2022 00:02 have a value 

         

        overall the following result

        Date Time ParameterResult
        28/01/2023 00:01A3
        28/01/2023 00:02A1
        28/01/2023 00:03A1
        28/01/2023 00:04A1
        28/01/2023 00:05A1
        28/01/2023 00:06A1
        28/01/2023 00:07B3
        28/01/2023 00:08B3
        28/01/2023 00:09B3
        28/01/2023 00:10B2
        28/01/2023 00:11B2
        28/01/2023 00:12B3

         

        please helpme for this problem,

        because i try only used relationship and show with table. this result 

        Date Time ParameterResult
        28/01/2023 00:01A 
        28/01/2023 00:02A1
        28/01/2023 00:03A 
        28/01/2023 00:04A 
        28/01/2023 00:05A1
        28/01/2023 00:06A 
        28/01/2023 00:07B3
        28/01/2023 00:08B 
        28/01/2023 00:09B 
        28/01/2023 00:10B2
        28/01/2023 00:11B 
        28/01/2023 00:12B3

         

        thank you