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
jrmaier
Helper IV
Helper IV

UPPER is returning numbers as all uppercase values.

When using the function below, I get number values included in the "yes" slicer results. Is there a way to filter out numbers from being returned?

 

uppercase numbers.png

1 ACCEPTED SOLUTION

Hi @jrmaier ,

 

Try the following:

Column =
SWITCH (
    TRUE (),
    '132330'[HomeAdress2] = BLANK (), BLANK (),
    FIND ( "#", '132330'[HomeAdress2],, -1 ) = 1, "NO",
    SWITCH (
        TRUE (),
        IFERROR ( ( '132330'[HomeAdress2] * 3 ), 0 ) = 0,
            IF (
                EXACT ( UPPER ( '132330'[HomeAdress2] ), '132330'[HomeAdress2] ),
                "yes",
                "no"
            ),
        "no"
    )
)

 

MFelix_0-1672326246475.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

8 REPLIES 8
jrmaier
Helper IV
Helper IV

@v-yueyunzh-msft thank you for your help! How do I add in your function to this below that I use to look for all UPPER case text?

HA2 = IF (
    '132330'[HomeAddress2] = BLANK (),
    BLANK (),
    SWITCH (
        TRUE (),
        IFERROR ( ( '132330'[HomeAddress2] * 3 ), 0 ) = 0,
            IF (
                EXACT ( UPPER ( '132330'[HomeAddress2] ), '132330'[HomeAddress2] ),
                "yes",
                "no"
            ),
        "no"
    )
)
MFelix
Super User
Super User

hi @jrmaier ,

 

Try the following code:

 

Column =
IF (
    '132330'[HomeAdress2] = BLANK (),
    BLANK (),
    SWITCH (
        TRUE (),
        IFERROR ( ( '132330'[HomeAdress2] * 3 ), 0 ) = 0,
            IF (
                EXACT ( UPPER ( '132330'[HomeAdress2] ), '132330'[HomeAdress2] ),
                "yes",
                "no"
            ),
        "no"
    )
)

 

When it's number the measure returns no:

MFelix_0-1672247027693.png

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix that took care of values that were just numbers. Thank you very much!
These are the values that still show. I can live with the ones with capital letters with the numbers. Is there a way to filter out the # symbol?

Snag_20462928.png

HI @jrmaier ,

 

Try the following code:

 

Column =
IF (
    '132330'[HomeAdress2] = BLANK (),
    BLANK (),
    SWITCH (
        TRUE (),
        IFERROR ( ( '132330'[HomeAdress2] * 3 ), 0 ) = 0 || FIND("#",[Column],,-1) = 0,
            IF (
                EXACT ( UPPER ( '132330'[HomeAdress2] ), '132330'[HomeAdress2] ),
                "yes",
                "no"
            ),
        "no"
    )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix That still returns values with an #  as shown in the image.Snag_2484d19b.png

Hi @jrmaier ,

 

Try the following:

Column =
SWITCH (
    TRUE (),
    '132330'[HomeAdress2] = BLANK (), BLANK (),
    FIND ( "#", '132330'[HomeAdress2],, -1 ) = 1, "NO",
    SWITCH (
        TRUE (),
        IFERROR ( ( '132330'[HomeAdress2] * 3 ), 0 ) = 0,
            IF (
                EXACT ( UPPER ( '132330'[HomeAdress2] ), '132330'[HomeAdress2] ),
                "yes",
                "no"
            ),
        "no"
    )
)

 

MFelix_0-1672326246475.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix that worked. Thank you very much!

Hi , @jrmaier 

According to your description, you want to filter out the number and the text start with "#".

You can use this column to realize:

Column 2 = var _find= FIND("#",[Column],,-1)
var _number =IFERROR( VALUE([Column]),BLANK())
return
IF(_find=1,"no", IF(_number<>BLANK(),"no","yes"))

The result is as follows:

vyueyunzhmsft_0-1672279769970.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

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.