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
Anonymous
Not applicable

how to get this icon in a dax measure?

Hi

I've had this dax measure for a while which i got help on from another user - however i've been trying to figure out how they were able to add this icon into the dax measure but have had no luck.

 

Does anyone know how this is done? (the green and red circle)

Expiry warning = var __diff =

DATEDIFF(MAX(Pipeline[Delivery Date] ) , MAX(Pipeline[Approval Expiry Date]),MONTH ) return IF( HASONEVALUE(Pipeline[Delivery Date] ), IF( __diff <= 3 , " 🔴 " & __diff & " months" ,"🟢 " & __diff & " months" ) )

2 ACCEPTED SOLUTIONS
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Please try this:-

 

Expiry warning =
VAR __diff =
    DATEDIFF (
        MAX ( Pipeline[Delivery Date] ),
        MAX ( Pipeline[Approval Expiry Date] ),
        MONTH
    )
RETURN
    IF (
        HASONEVALUE ( Pipeline[Delivery Date] ),
        IF (
            __diff <= 3,
            UNICHAR ( 128308 )  & __diff & " months",
            UNICHAR ( 128994 ) & __diff & " months"
        )
    )

 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

@Anonymous Basically the UNICHAR() DAX function is a text function that takes a numerical Unicode value and displays its associated character.  There different number for different type of icons.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Ah okay thats great to know!
Thank you for that.

Would you mind just explaining where the unichar(*****) comes from?

@Anonymous Basically the UNICHAR() DAX function is a text function that takes a numerical Unicode value and displays its associated character.  There different number for different type of icons.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Right okay that makes alot more sense.

Thank you so much for your help!!

Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Please try this:-

 

Expiry warning =
VAR __diff =
    DATEDIFF (
        MAX ( Pipeline[Delivery Date] ),
        MAX ( Pipeline[Approval Expiry Date] ),
        MONTH
    )
RETURN
    IF (
        HASONEVALUE ( Pipeline[Delivery Date] ),
        IF (
            __diff <= 3,
            UNICHAR ( 128308 )  & __diff & " months",
            UNICHAR ( 128994 ) & __diff & " months"
        )
    )

 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.