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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RicLup
Helper III
Helper III

create new column based in different values to assign status

Hi everyone:

 

I Hope you can help me. I need create a new column to assign one status bassed in differents conditions and values:

I have two scenarios for the same table by ID:

Scenario 1:

 I need the status Assigned in all ID rows, only if at least my field ReleasedConfirm contain one value in a row with FALSE.

 

Release 1.PNG

 

 

 

Scenario 2:

If the field ReleasedConfirm for the same ID contain value True, place the Assigned Status in that row,  and when have not projectId number place Free Status in thats rows.

 

Release 2.PNG

 

These are my scenarios for the same table by differents ID, to create  one column status with the contions explained above.

 

Regards and thanks for your time to help me!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @RicLup 

If [ReleasedConfirm] column of "True/False" type, please create a column below:

Column =
VAR counts =
    CALCULATE (
        COUNT ( Sheet1[ID] ),
        FILTER (
            ALLEXCEPT (
                Sheet1,
                Sheet1[ID]
            ),
            [ReleasedConfirm]
                = FALSE ()
                && NOT (
                    ISBLANK ( [ReleasedConfirm] )
                )
        )
    )
RETURN
    IF (
        counts > 0,
        "Assigned",
        IF (
            [ProjectId]
                <> BLANK (),
            "Assigned",
            "Free"
        )
    )

Capture2.JPG

If [ReleasedConfirm] column of "text" type, please create a column below:

Column 3 =
VAR counts =
    CALCULATE (
        COUNT ( Sheet1[ID] ),
        FILTER (
            ALLEXCEPT (
                Sheet1,
                Sheet1[ID]
            ),
            FIND (
                "FALSE",
                [ReleasedConfirm2],
                1,
                0
            ) > 0
        )
    )
RETURN
    IF (
        counts > 0,
        "Assigned",
        IF (
            [ProjectId]
                <> BLANK (),
            "Assigned",
            "Free"
        )
    )

 

Best Regards
Maggie
Community Support Team _ Maggie Li
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-juanli-msft
Community Support
Community Support

Hi @RicLup 

If [ReleasedConfirm] column of "True/False" type, please create a column below:

Column =
VAR counts =
    CALCULATE (
        COUNT ( Sheet1[ID] ),
        FILTER (
            ALLEXCEPT (
                Sheet1,
                Sheet1[ID]
            ),
            [ReleasedConfirm]
                = FALSE ()
                && NOT (
                    ISBLANK ( [ReleasedConfirm] )
                )
        )
    )
RETURN
    IF (
        counts > 0,
        "Assigned",
        IF (
            [ProjectId]
                <> BLANK (),
            "Assigned",
            "Free"
        )
    )

Capture2.JPG

If [ReleasedConfirm] column of "text" type, please create a column below:

Column 3 =
VAR counts =
    CALCULATE (
        COUNT ( Sheet1[ID] ),
        FILTER (
            ALLEXCEPT (
                Sheet1,
                Sheet1[ID]
            ),
            FIND (
                "FALSE",
                [ReleasedConfirm2],
                1,
                0
            ) > 0
        )
    )
RETURN
    IF (
        counts > 0,
        "Assigned",
        IF (
            [ProjectId]
                <> BLANK (),
            "Assigned",
            "Free"
        )
    )

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you very much for the quick answer, it works great.

 

Regards!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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