Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
5 years ago
Solved

DAX - RELATING VALUES TO NUMBERS

Hello everyone, I have the following problem, I would need to create time ranges, that is, classify a number of people by the company and the time at which they arrive, as conditional to say, if a person corresponds to the company xy their arrival time is equal to the entrance (08:15) then give me as a result that meets, however if their arrival is greater than or equal to 09:40 , give me as a result that you have a delay and if you are over 10:30, it does not meet! In short, it would be to put a condition by mixing the company name with the schedule, is it possible?

  • Hi Syndicate_Admin ,

    arrive time<=08:15,meets

    arrive time>=9:40&&arrive time<10:30, you have a delay

    arrive time>=10:30,not meet

    Is like this?

     

    measure =
    IF (
        MAX ( 'table'[arrive time] ) <= "08:15",
        "meets",
        IF (
            MAX ( 'table'[arrive time] ) >= "9:40"
                && MAX ( 'table'[arrive time] ) < "10:30",
            " you have a delay",
            IF ( MAX ( 'table'[arrive time] ) >= "10:30", "not meet", BLANK () )
        )
    )

     

    If not like this ,could you porvide a sample?

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien

     

1 Reply

  • v-luwang-msft's avatar
    v-luwang-msft
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin ,

    arrive time<=08:15,meets

    arrive time>=9:40&&arrive time<10:30, you have a delay

    arrive time>=10:30,not meet

    Is like this?

     

    measure =
    IF (
        MAX ( 'table'[arrive time] ) <= "08:15",
        "meets",
        IF (
            MAX ( 'table'[arrive time] ) >= "9:40"
                && MAX ( 'table'[arrive time] ) < "10:30",
            " you have a delay",
            IF ( MAX ( 'table'[arrive time] ) >= "10:30", "not meet", BLANK () )
        )
    )

     

    If not like this ,could you porvide a sample?

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien