cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dgwilson
Resolver III
Resolver III

FORMAT icon set for use in a data card

I'm building my own KPI indicator. The last element to get working is an indicator icon.

 

I have a DAX Measure that turens 0, 1, 2 (Up, Down, Neutral). All I need out of that is the ICON.

Fundamentally this does the trick.

 
    SWITCH (
            TRUE(),
            theIndicator = 1, "ColoredArrowUp",
            theIndicator = 0, "ColoredArrowRight",
            theIndicator = 2, "ColoredArrowDown"
            )
 

Is it possible to now use the FORMAT DAX command deliver the ICON result? It doesn't have Custom Formatting available.

I can deliver the ICON via a Table - but that has a column header and row values - so that's super ugly.

 

How would you deliver the ICON?

1 ACCEPTED SOLUTION
jdbuchanan71
Super User II
Super User II

Hello @dgwilson 

You could look at the UNICHAR() function to return an icon to a card.  It would be something like this where [Parameter Value] is your measure that returns the result.

Icon = 
VAR theIndicator = [Parameter Value]
RETURN
   SWITCH (
            TRUE(),
            theIndicator = 1, UNICHAR(9650),
            theIndicator = 0, UNICHAR(9654),
            theIndicator = 2, UNICHAR(9660)
            )

Then you can make a measure that does the conditional fomatting on the data label as well.

conditionalformatLabel.jpg

Icon Format = 
VAR theIndicator = [Parameter Value]
RETURN
   SWITCH (
            TRUE(),
            theIndicator = 1, "Green",
            theIndicator = 0, "Yellow",
            theIndicator = 2, "Red"
            )

When you combine the two together in a card you will be close I think.

ConditionalFormatIcon.jpg

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User II
Super User II

Hello @dgwilson 

You could look at the UNICHAR() function to return an icon to a card.  It would be something like this where [Parameter Value] is your measure that returns the result.

Icon = 
VAR theIndicator = [Parameter Value]
RETURN
   SWITCH (
            TRUE(),
            theIndicator = 1, UNICHAR(9650),
            theIndicator = 0, UNICHAR(9654),
            theIndicator = 2, UNICHAR(9660)
            )

Then you can make a measure that does the conditional fomatting on the data label as well.

conditionalformatLabel.jpg

Icon Format = 
VAR theIndicator = [Parameter Value]
RETURN
   SWITCH (
            TRUE(),
            theIndicator = 1, "Green",
            theIndicator = 0, "Yellow",
            theIndicator = 2, "Red"
            )

When you combine the two together in a card you will be close I think.

ConditionalFormatIcon.jpg

View solution in original post

I've been able to get to this...  🙂

Bit more cleanup required... however it's getting there...

2019-10-08 14_08_59-Revenue Summary Test - Power BI Desktop.png

That is a very nice solution. Thank you.

I have a few more measures that I'd really like just to support the implementation, I can hopefully workaround this with groups and/or naming of the measures.

 

Thank you.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors