Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

ISINSCOPE Not Returning Date

I'm creating this matrix and when I use the ISINSCOPE function to return a date value, it is resulting in a number.

The numbers are supposed to match the date next to it. In theory I would remove the Earliest Base Start Date and keep the Base Start Testing column in. 

This is my formula:

 

  • hi Anonymous ,

     

    try like:

    measure = 

    FORMAT(SWITCH(...), "mm/dd/yyyy")

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi All,
    Firstly FreemanZ thank you for your solution!
    And Anonymous,I tried to modify your code a little bit hope it helps!

    Base Start Testing = 
    SWITCH(
        TRUE(),
        ISINSCOPE('Query'[ActivityName]), BLANK(),
        ISINSCOPE('Query'[Merged]), FORMAT(FIRSTDATE('Query'[Date]),"MM-DD-YYYY"),
        ISINSCOPE('Query'[Division]), BLANK(),
        BLANK()
    )
    Base Start Testing(copy) = 
    SWITCH(
        TRUE(),
        ISINSCOPE('Query'[ActivityName]), BLANK(),
        ISINSCOPE('Query'[Merged]), CONVERT(FIRSTDATE('Query'[Date]),STRING),
        ISINSCOPE('Query'[Division]), BLANK(),
        BLANK()
    )
    

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • hi Anonymous ,

     

    try like:

    measure = 

    FORMAT(SWITCH(...), "mm/dd/yyyy")

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi All,
    Firstly FreemanZ thank you for your solution!
    And Anonymous,I tried to modify your code a little bit hope it helps!

    Base Start Testing = 
    SWITCH(
        TRUE(),
        ISINSCOPE('Query'[ActivityName]), BLANK(),
        ISINSCOPE('Query'[Merged]), FORMAT(FIRSTDATE('Query'[Date]),"MM-DD-YYYY"),
        ISINSCOPE('Query'[Division]), BLANK(),
        BLANK()
    )
    Base Start Testing(copy) = 
    SWITCH(
        TRUE(),
        ISINSCOPE('Query'[ActivityName]), BLANK(),
        ISINSCOPE('Query'[Merged]), CONVERT(FIRSTDATE('Query'[Date]),STRING),
        ISINSCOPE('Query'[Division]), BLANK(),
        BLANK()
    )
    

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.