Forum Discussion
Customized and Dynamic text box or card
Hello Power BI community
I need a help on below.
I have waterfall charts vs multiple forecast scenarios such as below.
I am using switch values and buttons to change between sales value and volume value.
If I click on sales button, I get sales variance and if I click on volume button, I get volume variance.
What I want to achieve is that on the top right corner of the waterfall chart, I am showing a variance vs each forecast scenario.
1. I want to show if the variance is positive, i want to show a green triangle in front of value with a plus sign in front (▲+0.5m€, ▲+110ton) and in red if it is negative (▼-0.5m€, ▼-110ton)
2. if it is a volume variance, i want to show XXX ton and if it is a sales variance, i want to show XX m€
How can I achieve this?
Hi hidenseek9 ,
We cannot display only the triangle icon in red or green based on values in a Card visual. However, we can change the entire text color (including the triangle and value) to red or green using conditional formatting.
To appy conditional formatting click on card visual, navigate to format visualizations tab, expand callout values click fx option available next to color and add the rules as shown below. Attached updated pbix file for reference.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
4 Replies
- v-sathmakuri
Community Support
Hi hidenseek9 ,
Thank you for reaching out to Microsoft Fabric Community.
I have used the following measure to meet your requirements and have also attached the PBIX file for your reference. Please let us know if you have any further questions.
Variance Display =
VAR VarValue = [Variance Value]
VAR Unit = IF([SelectedType] = "Sales", "m€", "ton")
VAR Symbol =
SWITCH(TRUE(),
VarValue > 0, "▲+" & FORMAT(ABS(VarValue), "0.0") & Unit,
VarValue < 0, "▼-" & FORMAT(ABS(VarValue), "0.0") & Unit,
"0" & Unit
)
RETURN Symbol
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!Thank you!!
- hidenseek9Post Patron
This works well! Thank you.
Is there a way to display a triangle in green if a value is positive and in red if the value is negative?
- v-sathmakuri
Community Support
Hi hidenseek9 ,
We cannot display only the triangle icon in red or green based on values in a Card visual. However, we can change the entire text color (including the triangle and value) to red or green using conditional formatting.
To appy conditional formatting click on card visual, navigate to format visualizations tab, expand callout values click fx option available next to color and add the rules as shown below. Attached updated pbix file for reference.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
- hidenseek9Post Patron
This works amazingly! Thank you!