Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

October 28 & 29: Experts share their secrets on how to pass the Fabric Analytics Engineer certification exam—live. Learn more

Reply
abc_777
Solution Specialist
Solution Specialist

hi

Hello,

 

I have a calendar table. here i want to change the colour of day of week (friday and saturday) to be red and others (sunday. monday, tuesday, wednessday, thrusday) to be black.

 

as well as

 

I want to change the calendar day of month according to friday and saturday to be red and rest would be black

 

Please help me the process if possible

 

abc_777_0-1709455554640.png

 

 

thanks

1 ACCEPTED SOLUTION
lucadelicio
Super User
Super User

Hi abc i'll be happy to help you. Can you post the pbix?

You have to create a measure to use in the conditional formatting settings.
Using the dax function Switch you have to scroll the Calendar[WeekDay] and return the color result that you want.
Try something like this:
ConditionalFormattingMeasure = SWITCH ( [WekDay], "Friday", "#FF2701", "Saturday", "#FF2701", "#000000")
https://learn.microsoft.com/it-it/dax/switch-function-dax
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

 Luca D'Elicio



Luca D'Elicio

LinkedIn Profile

View solution in original post

10 REPLIES 10
lucadelicio
Super User
Super User

Hi abc i'll be happy to help you. Can you post the pbix?

You have to create a measure to use in the conditional formatting settings.
Using the dax function Switch you have to scroll the Calendar[WeekDay] and return the color result that you want.
Try something like this:
ConditionalFormattingMeasure = SWITCH ( [WekDay], "Friday", "#FF2701", "Saturday", "#FF2701", "#000000")
https://learn.microsoft.com/it-it/dax/switch-function-dax
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

 Luca D'Elicio



Luca D'Elicio

LinkedIn Profile

@lucadelicio ,

 

thanks for your reply so quick,

 

I am trying to create a sample file if possible, as it takes time reasoning of the calendar table that i gave in my previous post takes long time to create and has company data in it.

 

But i will try my best to create.

 

In mean time i have created a calculative column  using 

test week color = SWITCH ( [Day Of Week], "Friday", "#FF2701", "Saturday", "#FF2701", "#000000")
 

then i go to font colour from Cell element menu

 

please guid me what next

abc_777_0-1709458677932.png

 

 

thx

You have to create MEASURE not calculated column.
Then you can use in the conditional formatting.
Try this.



Luca D'Elicio

LinkedIn Profile

set a googl meeting on lucadelicio@gmail.com i'll be happy to help you.



Luca D'Elicio

LinkedIn Profile

thx for the reply, whats your time difference?

i'm GMT+2 now is 13:09.
I go out for some hours if you are available put it at my 16:00 (in 3 hours).
Thank you very much



Luca D'Elicio

LinkedIn Profile

i am GMT+6 means and my current time is 5.30 pm

so with you time difference is 4 hr

 

3 hr later mean my time would be8-830 pm today

i be online then

thx

abc_777
Solution Specialist
Solution Specialist

i have sent a meeting request via google meet about 2 hrs time fro now

 

thx

abc_777
Solution Specialist
Solution Specialist

i m free from on ward

i'm waiting in the meeting



Luca D'Elicio

LinkedIn Profile

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.