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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
saipawar
Helper IV
Helper IV

How can I create a visual to show growth?

Hi!!

 

How can I show colored up and down arrows to represent Quarter over Quarter growth? I have tried the KPI card but that didn't work out as per my expectations.

 

Here's how my data looks - 

 
 

kpi.PNG

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

Hi @saipawar ,

 

Please set conditional formatting of the visual like that.

 

2.PNGCapture.PNG

 

Before that, we should create two measures as below.

Arrows for % Change = var result = MAX('Table'[% Change ])
var output = SWITCH(
    true,
	result > 0, UNICHAR(8593),
    result < 0, UNICHAR(8595),
    UNICHAR(8596)
)
RETURN
OUTPUT
Arrows for % Change_ = var result = MAX('Table'[% Change ])
var output = SWITCH(
    true,
	result > 0, "Green",
    result < 0, "Red",
    "black"
)
RETURN
OUTPUT

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

12 REPLIES 12
v-frfei-msft
Community Support
Community Support

Hi @saipawar ,

 

Please set conditional formatting of the visual like that.

 

2.PNGCapture.PNG

 

Before that, we should create two measures as below.

Arrows for % Change = var result = MAX('Table'[% Change ])
var output = SWITCH(
    true,
	result > 0, UNICHAR(8593),
    result < 0, UNICHAR(8595),
    UNICHAR(8596)
)
RETURN
OUTPUT
Arrows for % Change_ = var result = MAX('Table'[% Change ])
var output = SWITCH(
    true,
	result > 0, "Green",
    result < 0, "Red",
    "black"
)
RETURN
OUTPUT

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

One option can be to create a measure that returns one of these unicode arrows based on your other measure  UNICHAR(8593), UNICHAR(8595), UNICHAR(8596).  You can then use conditional formatting to colour them.

 

This could be:

Arrows for % Change:= var result = [% Change]
var output = SWITCH(
    true,
	result > 0, UNICHAR(8593),
    result < 0, UNICHAR(8595),
    UNICHAR(8596)
)
RETURN
OUTPUT

Hi @Anonymous 

 

My % change column name is not being picked up by DAX. The column name is greyed out as you can see below - 

 

arrow.PNG

 

Please help me get this right.

 

Thanks!!

 

Anonymous
Not applicable

When writing a measure you have told DAX to use the column but not told DAX what to do with the column.  In my example [% Change] was assumed to be a measure that calculated the % Change. 

 

You might need to add something like MAX() or MIN() around the column name, but you need to be aware of the effect this will have depending on how you intend to use the measure.

Hi @Anonymous thanks for the input.

 

Here's the code that worked for me - 

      Arrow = SWITCH(TRUE(), [Collab Delta] < 0,UNICHAR(8595),[Collab Delta] > 0,UNICHAR(8593))
     Although, I do not see an option for conditional formating with this under Format.
     Is there any other way to import colored (gree, yellow red) unicode values? 
 
Thanks
 
 

 

Anonymous
Not applicable

There are 2 parts to this.  This measure is creating the "data".  The conditional formatting is a separate thing you set up on the visual itself.  You can either set up the rules using the visual's interface for conditional formatting, or you can create another measure that returns hexadecimal colour codes that the conditional formatting interface points to.

v-frfei-msft
Community Support
Community Support

Hi @saipawar ,

 

Set the formatting of the measure/ column using the Formatting section of the Modeling tab in the ribbon.

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
tarunsingla
Solution Sage
Solution Sage

Using the value of % change, you can add icon as explained here:

https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#add-icons

Hi @tarunsingla 

 

Thanks for sharing the link. I imported the data in PBI and changed the data type for both the "Delta" columns to "Percentage" but looks like when and hit "Close and Apply", I still see the delta numbers as decimals and not percentages. Would you know what might be causing this?

 

Thanks!! 

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish!! Thanks for helping here 😌

 

You can download the excel and pbix file from here - https://drive.google.com/drive/folders/1OTlOzkAIH8e2Py5wB7ISd3c8ptKdS4vr?usp=sharing.

 

The dataset shows the number of followers for each social channel and for two teams/products.

Ultimately depending on the delta % (column D and G), I would like to show a colored upward or downward arrow next to the QTD number (Column B and E) -

 

Here's a mockup -

 kpi 2.PNG

 

Thanks!!

 

 

 

amitchandak
Super User
Super User

In the matrix table, you have an option in the conditional formatting: icon. You can check that and you will get an advance control.

 

But this metric * metric format will not work so easily. You need to do something like this

union(
summarize("Measure","Share of Voice", "YTD",[Share of Voice YTD], "LYTD",[Share of Voice LYTD], "Change %",[Share of Voice %]),
summarize("Measure","SOV Rank", "YTD",[SOV Rank YTD], "LYTD",[SOV Rank LYTD], "Change %",[SOV Rank %])
)

 

No in conditional formatting choose Change %, enable icon and use advance control.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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