Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello,
a would like to ask for help with colour of columns. I have weekly report, where are graphs of last 4 weeks, there are always same colours. Actual week is yellow, second one is grey, third is orange and last one is blue → the weeks are changing every week, but I need the colours always be the same based of week age.
Thank you for your help
Barbora
Hi @Barculez ,
For this you need to make a measure to force the colour of your weeks something similar to this:
Colour Coding =
SWITCH (
TRUE (),
MAX ( 'Date'[Week] ) = WEEKNUM ( TODAY () ), "Yellow",
MAX ( 'Date'[Week] )
= WEEKNUM ( TODAY () ) - 1, "Grey",
MAX ( 'Date'[Week] )
= WEEKNUM ( TODAY () ) - 2, "Orange",
MAX ( 'Date'[Week] )
= WEEKNUM ( TODAY () ) - 3, "Blue"
)
Not sure if you want to have the current date for the current week or the last week selected on a calendar but should work when you added it to condittionl formattting.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI don´t have there a date, I've there just numbers of week which I filter.
The chart looks like this:
and every week, when I filter those last weeks i have to change the colour here:
Do you think that the measure will work for this too? Or there is another way.
Thank you very much
Hi @Barculez ,
The Date is the name of the table were my week is so in your case you must replace the Date[Week] by the name of the table you have for example FactTable[Week] but be aware that since you are using the week as legend you cannot use the condittional formatting.
Do you always want to get the last 4 weeks for this chart? how is this being built?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
113 | |
73 | |
65 | |
46 |