Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 -
Solved! Go to Solution.
Hi @saipawar ,
Please set conditional formatting of the visual like that.
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.
Hi @saipawar ,
Please set conditional formatting of the visual like that.
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.
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 -
Please help me get this right.
Thanks!!
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 -
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.
Hi @saipawar ,
Set the formatting of the measure/ column using the Formatting section of the Modeling tab in the ribbon.
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!!
Hi,
Share the link from where i can download your PBI file.
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 -
Thanks!!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
122 | |
101 | |
71 | |
61 |