The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello
I want to asked how to do conditional formatting on weekly data.
I want the background would be red if any week is less than previous week and the background would be green if its greater.
I already have date table in here.
The example data look like this :
Thank you
Solved! Go to Solution.
Hi @ChristoNindyo ,
You can use a custom measure to calculate the differences between weeks and assign a color code to each result, and then use this measure in the conditional formatting using the option 'Field Value' (please refer to image below).
An example of a custom measure for color coding:
Color Coding =
SWITCH(
TRUE(),
[This Week] < [Last Week], "#DC143C" // Red
[This Week] > [Last Week], "#85cc18" // Green
[This Week] = [Last Week], "#0c0c0c" // Black
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
Best regards,
Joao Ribeiro
Hi @ChristoNindyo ,
You can use a custom measure to calculate the differences between weeks and assign a color code to each result, and then use this measure in the conditional formatting using the option 'Field Value' (please refer to image below).
An example of a custom measure for color coding:
Color Coding =
SWITCH(
TRUE(),
[This Week] < [Last Week], "#DC143C" // Red
[This Week] > [Last Week], "#85cc18" // Green
[This Week] = [Last Week], "#0c0c0c" // Black
)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
Best regards,
Joao Ribeiro
@ChristoNindyo it was just an example of measures with the current and last week values for the metric you are trying to compare. Please let me know if you need help with this part too.
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
Best regards,
Joao Ribeiro
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
248 | |
123 | |
111 | |
78 | |
74 |