Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I need to change the color of specific text in the card visual, as you can see below 2.8% is increased that's why it's green and 210bps is decreased hence red.
This whole line I am writing in measure and then putting it in card visual.
Is it possible to color code only that many parts (2.8% and 210bps) in the card?
Solved! Go to Solution.
Hi @Composed_MS
When faced with these situations, I tend to reach for a simple solution that just works.
Uses a text box to combine two cards and apply conditional formatting rules.
As follows:
1.The text box is prepared and places where cards will go. I just type a string of strings that will save me space for the cards according to their maximum character limit:
2. Creating each card with its conditional format, white background and cleaning everything that takes up space, and changing the border padding to eliminate white spaces
3.I attach the cards to the places I saved them once they are designed
4. Grouping all created "construction"
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Same issue here. It'd be good to be able to use FORMAT()... I don't think the answer marked as a solution is the solution... Is a workaround, but not always usable...
Hi @Composed_MS
When faced with these situations, I tend to reach for a simple solution that just works.
Uses a text box to combine two cards and apply conditional formatting rules.
As follows:
1.The text box is prepared and places where cards will go. I just type a string of strings that will save me space for the cards according to their maximum character limit:
2. Creating each card with its conditional format, white background and cleaning everything that takes up space, and changing the border padding to eliminate white spaces
3.I attach the cards to the places I saved them once they are designed
4. Grouping all created "construction"
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hello Ritaf,
have a great day!
I have used this solution when i got the color code work, but my client uphappy with this work, they are expecting the colors to text only when we add the values into text should reflect the colors dynamically, is there any alternate method, please share with me.
Thanks,
Arjun Reddy
Maybe it is time to explain to your client that Power BI is a powerful tool to be exploited in a careful way.
Good luck with that 🙂
Hello @Ritaf1983
The issue with this one is I am having around 70 lines with above 50 numbers of green or red color in it.
So making it will be a lot of rework.
But thanks a lot for this much effort.
I tried HTML visual for this and made the text colored using HTML code. It worked as well but the issue is that the visual is not supported to export.
There's no free HTML visual, which is Power BI certified. We want users to export the page to pdf or ppt.
Create a measure that calculates the desired value and includes the text with color coding. For example :
yourMeasure = SUM(yourTable[Column])
I am using the whole line as a single measure, which is dynamic according to selection.
In measure, I wrote it using & operator so that my text gets concatenated.
Increase and decrease are dynamic which I coded in the measure itself.
So in that measure for these two numbers I need to color code and other words should remain black colored only. @AmiraBedh
Can you please share your pbix file ? or at least the code of your measure?
Measure->
"TO has "
&
SWITCH([TO CY vs PY],
"#71CE0D","increased",
"#E80054","declined")
& " by " & FORMAT([TO CY vs PY],"Percent")
& " and there’s an " &
SWITCH([head CY vs PY],
"#71CE0D","increment",
"#E80054","decrement")
&" of " & FORMAT([head CY vs PY]*100,"0.0") &"bps in headcount percentage from "& [Vs PY Quarter]
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
107 | |
101 | |
38 | |
35 |
User | Count |
---|---|
149 | |
122 | |
76 | |
74 | |
52 |