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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
adam_macs
Helper I
Helper I

Blank value is returning 0-7 in grouping/binning

Hi, i have created a days grouping based on the values in column "Days to Resolve". For some reason the blank values are still returning as 0-7 Days. Any ideas what i need to add to below measure to return blank values as "Unsolved" in my grouping? 

 

adam_macs_1-1667994222873.png

 

Days to Resolve (Grouping) = 
SWITCH (
TRUE (),
JIRA_Data[Days to Resolve] >= 0
&& JIRA_Data[Days to Resolve] <= 7, "0-7 Days",
JIRA_Data[Days to Resolve] > 7
&& JIRA_Data[Days to Resolve] <= 31, "8-31 Days",
JIRA_Data[Days to Resolve] > 31
&& JIRA_Data[Days to Resolve] <= 91, "32-91 Days",
JIRA_Data[Days to Resolve] > 91
&& JIRA_Data[Days to Resolve] <= 182, "92-182 Days",
JIRA_Data[Days to Resolve] > 182
&& JIRA_Data[Days to Resolve] <= 365, "183-365 Days",
">365 Days")

 

 

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

Please try the below whether it suits your requirement.

 

Days to Resolve (Grouping) =
SWITCH (
    TRUE (),
    JIRA_Data[Days to Resolve] == BLANK (), "Unsolved",
    JIRA_Data[Days to Resolve] >= 0
        && JIRA_Data[Days to Resolve] <= 7, "0-7 Days",
    JIRA_Data[Days to Resolve] > 7
        && JIRA_Data[Days to Resolve] <= 31, "8-31 Days",
    JIRA_Data[Days to Resolve] > 31
        && JIRA_Data[Days to Resolve] <= 91, "32-91 Days",
    JIRA_Data[Days to Resolve] > 91
        && JIRA_Data[Days to Resolve] <= 182, "92-182 Days",
    JIRA_Data[Days to Resolve] > 182
        && JIRA_Data[Days to Resolve] <= 365, "183-365 Days",
    ">365 Days"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

johnt75
Super User
Super User

Blank equates to 0, so you need a specific test for it

Days to Resolve (Grouping) =
SWITCH (
    TRUE (),
    ISBLANK ( JIRA_Data[Days to Resolve] ), "Unsolved",
    JIRA_Data[Days to Resolve] >= 0
        && JIRA_Data[Days to Resolve] <= 7, "0-7 Days",
    JIRA_Data[Days to Resolve] > 7
        && JIRA_Data[Days to Resolve] <= 31, "8-31 Days",
    JIRA_Data[Days to Resolve] > 31
        && JIRA_Data[Days to Resolve] <= 91, "32-91 Days",
    JIRA_Data[Days to Resolve] > 91
        && JIRA_Data[Days to Resolve] <= 182, "92-182 Days",
    JIRA_Data[Days to Resolve] > 182
        && JIRA_Data[Days to Resolve] <= 365, "183-365 Days",
    ">365 Days"
)

 

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Blank equates to 0, so you need a specific test for it

Days to Resolve (Grouping) =
SWITCH (
    TRUE (),
    ISBLANK ( JIRA_Data[Days to Resolve] ), "Unsolved",
    JIRA_Data[Days to Resolve] >= 0
        && JIRA_Data[Days to Resolve] <= 7, "0-7 Days",
    JIRA_Data[Days to Resolve] > 7
        && JIRA_Data[Days to Resolve] <= 31, "8-31 Days",
    JIRA_Data[Days to Resolve] > 31
        && JIRA_Data[Days to Resolve] <= 91, "32-91 Days",
    JIRA_Data[Days to Resolve] > 91
        && JIRA_Data[Days to Resolve] <= 182, "92-182 Days",
    JIRA_Data[Days to Resolve] > 182
        && JIRA_Data[Days to Resolve] <= 365, "183-365 Days",
    ">365 Days"
)

 

Jihwan_Kim
Super User
Super User

Hi,

Please try the below whether it suits your requirement.

 

Days to Resolve (Grouping) =
SWITCH (
    TRUE (),
    JIRA_Data[Days to Resolve] == BLANK (), "Unsolved",
    JIRA_Data[Days to Resolve] >= 0
        && JIRA_Data[Days to Resolve] <= 7, "0-7 Days",
    JIRA_Data[Days to Resolve] > 7
        && JIRA_Data[Days to Resolve] <= 31, "8-31 Days",
    JIRA_Data[Days to Resolve] > 31
        && JIRA_Data[Days to Resolve] <= 91, "32-91 Days",
    JIRA_Data[Days to Resolve] > 91
        && JIRA_Data[Days to Resolve] <= 182, "92-182 Days",
    JIRA_Data[Days to Resolve] > 182
        && JIRA_Data[Days to Resolve] <= 365, "183-365 Days",
    ">365 Days"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.