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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kboud3
Helper I
Helper I

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.

kboud3_0-1730324463384.png

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:

kboud3_1-1730324536772.png

 

2 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

hi @kboud3 ,

 

try like:

measure = 

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

View solution in original post

v-xingshen-msft
Community Support
Community Support

Hi All,
Firstly FreemanZ thank you for your solution!
And @kboud3,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()
)

vxingshenmsft_2-1730358637185.png

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.

View solution in original post

2 REPLIES 2
v-xingshen-msft
Community Support
Community Support

Hi All,
Firstly FreemanZ thank you for your solution!
And @kboud3,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()
)

vxingshenmsft_2-1730358637185.png

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.

FreemanZ
Super User
Super User

hi @kboud3 ,

 

try like:

measure = 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.